I have a kubernetes
cluster working perfectly fine. It has 5 worker nodes. I am using below command to get the status of pods.
kubectl get pod -o wide --namespace=machines
which shows below results
NAME READY STATUS RESTARTS AGE IP NODE
deployment-26hfn 0/4 ContainerCreating 0 5m <none> machine003
deployment-782mk 0/4 Pending 0 5m <none> machine001
deployment-7kcc7 0/4 Pending 0 5m <none> machine002
deployment-8fzqs 0/4 ContainerCreating 0 5m <none> machine004
deployment-zfzts 0/4 ContainerCreating 0 5m <none> machine005
As you can see, the above result is not in order from machine001
to machine 005
. Is it possible to print the output like below:
NAME READY STATUS RESTARTS AGE IP NODE
deployment-26hfn 0/4 Pending 0 5m <none> machine001
deployment-782mk 0/4 Pending 0 5m <none> machine002
deployment-7kcc7 0/4 ContainerCreating 0 5m <none> machine003
deployment-8fzqs 0/4 ContainerCreating 0 5m <none> machine004
deployment-zfzts 0/4 ContainerCreating 0 5m <none> machine005