DEV Community

itbj00
itbj00

Posted on

Answer: How to sort pods with respect to their IPs

You're using the wrong command to sort. The correct command will be:

kubectl get pods --all-namespaces --sort-by={.status.podIP}

This will sort your pods according to the podIP.

Top comments (0)