当前位置:   article > 正文

kubectl 如何查看 node、pod 的 cpu、ram使用率_kubectl查看容器占用内存

kubectl查看容器占用内存

简介

╰─➤  kubectl top --help     
Display Resource (CPU/Memory) usage.

 The top command allows you to see the resource consumption for nodes or pods.

 This command requires Metrics Server to be correctly configured and working on the server.

Available Commands:
  node          Display resource (CPU/memory) usage of nodes
  pod           Display resource (CPU/memory) usage of pods

Usage:
  kubectl top [flags] [options]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

查看node

/ # kubectl  top node
NAME                    CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%
devops-prod-master-1    3210m        6%     33845Mi         69%
devops-prod-master-2    2617m        5%     19375Mi         40%
devops-prod-master-3    2472m        31%    11755Mi         75%
  • 1
  • 2
  • 3
  • 4
  • 5

查看pod

/ # kubectl top pod -A | grep cv-console-dev | grep rds
cv-console-dev                     cv-console-rds-6b97c64d87-v8djz                                   36m          522Mi
cv-console-dev                     cv-console-web-rds-77cc5d94fd-fwr2q                               1m           25Mi
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/671801
推荐阅读
相关标签
  

闽ICP备14008679号