博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
kubectl top查看k8s pod的cpu , memory使用率情况
阅读量:6260 次
发布时间:2019-06-22

本文共 3033 字,大约阅读时间需要 10 分钟。

To see the pods that use the most cpu and memory you can use the kubectl top command but it doesn’t sort yet and is also missing the quota limits and requests per pod. You only see the current usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ kubectl top pod --all-namespaces
NAMESPACE NAME CPU(cores) MEMORY(bytes)
kube-system kube-proxy-gke-rel3170-
default
-pool-3459fe6a 2m 12Mi
kube-system kube-proxy-gke-rel3170-
default
-pool-3459fe6a 2m 12Mi
kube-system fluentd-gcp-v2.
0.9
-5t9q6 8m 85Mi
kube-system fluentd-gcp-v2.
0.9
-pd4s9 10m 84Mi
kube-system kube-dns-
3468831164
-v2gqr 1m 26Mi
kube-system event-exporter-v0.
1.7
-
1642279337
-180db 0m 13Mi
kube-system kube-proxy-gke-rel3170-
default
-pool-3459fe6a 1m 12Mi
kube-system l7-
default
-backend-
3623108927
-tjm9z 0m 1Mi
kube-system kube-dns-
3468831164
-cln0p 1m 25Mi
kube-system fluentd-gcp-v2.
0.9
-sj3rh 9m 84Mi
kube-system kube-dns-autoscaler-
244676396
-00btn 0m 7Mi
kube-system kubernetes-dashboard-
1265873680
-8prcm 0m 18Mi
kube-system heapster-v1.
4.3
-
3980146296
-33tmw 0m 42Mi

Because of these limitations, but also because you want to gather and store this resource usage information on an ongoing basis, a monitoring tool comes in handy. This allows you to analyze resource usage both in real time and historically, and also lets you alert on capacity bottlenecks.

 

实际示例:

[root@]:~# kubectl top  pod   -n taobao-spider NAME                                                      CPU(cores)   MEMORY(bytes)   app-1375507206-spider-new-v1-0-55f8cbb5cb-29wnz           0m           76Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-2s2qj           0m           69Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-6q9w7           0m           71Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-7s59f           0m           74Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-96lsb           0m           73Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-fdglr           0m           71Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-h52th           0m           71Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-j26cx           0m           73Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-k95gz           0m           71Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-pv9w7           0m           75Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-r9mtz           0m           69Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-vq79m           0m           75Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-xzzbs           0m           70Mi            app-1375507206-spider-new-v1-0-55f8cbb5cb-zhjdb           0m           80Mi            app-183215290-spider-v1-0-76f57788d-8jfqm                 93m          80Mi            app-2492659469-spider-new-v1-0-7fbf4d7c7d-vf552           20m          61Mi            app-3437963581-spider-v1-0-66cd9d7699-5z2vk               74m          108Mi           app-3437963581-spider-v1-0-66cd9d7699-79bwf               54m          75Mi

  

转载地址:http://vrqsa.baihongyu.com/

你可能感兴趣的文章
Laravel 的HTTP控制器
查看>>
结构型 之 适配器模式
查看>>
CAD导板框方法
查看>>
[CF1039D]You Are Given a Tree
查看>>
[LeetCode] Climbing Stairs 斐波那契数列
查看>>
【jUploader】1.0版 基于jQuery文件无刷新上传插件下载及介绍
查看>>
Html5 web 储存
查看>>
在ROS-Kinetic版本+RealSense 2.16下的ViSP 配置
查看>>
针对 .NET 开发人员的存储过程评估
查看>>
代理模式
查看>>
OPC DA 到 OPC UA
查看>>
CLR读书笔记--第一章 CLR的执行模型
查看>>
逆向分析(工具介绍)
查看>>
如何优雅地使用Markdown (Sublime 3 + MarkdownEditing+OmniMarkupPreviewer)
查看>>
【Kernel学习】基础篇——01一些标准宏定义和文件include关系
查看>>
hdu1503
查看>>
ES6模块的import和export用法
查看>>
easyui datagrid 搜索功能
查看>>
利用协程爬网页,自动切换io 精典案例:
查看>>
Ubuntu Server14.04 32位安装odoo8.0简单方法
查看>>