kubernetes - 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
解决方案
有关提供用法的一般命令,请参见 stackoverflow.com/a/64025079/2746623 在我正在做的 unix 上,kubectl top pod | sort -k2 -n
但这个答案更笼统。
这会告诉你使用情况,但如果你想要分配(基于请求和限制),那么你可能想要kubectl describe nodes
. 有一个github 线程有一些进一步的建议和讨论。
推荐阅读
- awk - 删除搜索模式之间的文本/行
- python - 如何检查传递给 filter() 函数的内容
- amazon-dynamodb - 多租户应用程序的 DynamoDB 安全性
- mysql - 如果不存在则创建表与显示表之类
- reactjs - 在危险地反应SetInnerHTML中将json显示为html
- r - 在 TOC 之前将代码添加到 Bookdown gitbook 模板
- swift - Xcode 搜索栏对更改文本或取消单击没有反应
- wordpress - Wordpress 清除页面模板的模板缓存?
- linux - Git克隆/从Windows拉到本地网络中的树莓派
- laravel - 我认为可以分解的控制器逻辑中的分解辅助