kubectl 获取 pods 的状态并通过 运行 以外的任何方式在状态选项卡上进行 grep

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

目前 运行 正在执行获取 pods 状态的命令:

kubectl -n kube-system get pods -o wide

想在 STATUS 列上进行 grep 或 ack out,并且只显示不是 运行 的任何内容。

有什么建议吗?

kubectl get pods --field-selector=status.phase!=Running呢(可能取决于你使用的 Kubernetes 版本)