首页 > 解决方案 > Get the Pod which has the maximum CPU usage

问题描述

I would like to sort the pod by maximum CPU usage. I know there is a lot of tools which comes with monitoring. I would like to find this by using 'kubectl top' command.

any help is appreciated - thanks

标签: kubernetes

解决方案


有关提供用法的一般命令,请参见 stackoverflow.com/a/64025079/2746623 在我正在做的 unix 上,kubectl top pod | sort -k2 -n但这个答案更笼统。

这会告诉你使用情况,但如果你想要分配(基于请求和限制),那么你可能想要kubectl describe nodes. 有一个github 线程有一些进一步的建议和讨论


推荐阅读