Is it possible to sort Kubernetes API list of ConfigMaps?

6/11/2019

Is it possible to sort Kubernetes API list of ConfigMaps?

Say you have an endpoint https://<DOMAIN>:6443/api/v1/namespaces/default/configmaps, and you are fetching the list of config maps. Is there any way to send a GET request with sorting params in the query?

For ex: https://<DOMAIN>:6443/api/v1/namespaces/default/configmaps?sort=name:DESC (which did not work)

-- s.n
kubectl
kubernetes

1 Answer

6/12/2019

As I know, you need to sort it by yourself. k8s-api-cm-refer hasn't sort parameters.

-- Ray
Source: StackOverflow