Openshift Pod CPU 和终止细节

Open shift Pod CPU and terminating details

  1. 是否有任何方法可以过滤仅终止 pods 或有问题的 pods 从我的主节点打开轮班。

  2. 有什么方法可以从特定节点找到哪个 pod 消耗更多CPU..从我在 Open shift 的主人那里。

我们尝试了一些命令,但没有太大帮助。

  1. Is there any way to filter only terminating pods or problematic pods in open shift from my master node.

要查看未处于 运行 状态(终止、CrashLoopBackOff 等)的 pods,您可以使用:

kubectl get pods --all-namespaces  | grep -Ev '([0-9]+)/'

或检查 pods 只有 Terminated 你可以使用:

kubectl get pods --all-namespaces --field-selector=status.phase=Terminated
  1. Is there any way to find which pod is consuming more CPU from the specific node..from my master in Open shift.

要查看 pod CPU 使用情况,您可以安装 metrics-server 并使用以下方法检查消耗:

kubectl top pod

oc adm top pod