Search code examples
kuberneteskubectl

kubectl get status of pods and grep on status tab by anything other than Running


Currently running following command to get status on pods:

kubectl -n kube-system get pods -o wide

Would like to grep or ack out on STATUS column and only show anything thats not running.

Any suggestions?


Solution

  • What about kubectl get pods --field-selector=status.phase!=Running (maybe depending on the Kubernetes version you are using)