Kubernetes · kubectl ·
[Kubernetes] kubectl top command
기본 구조 #
1kubectl top [리소스 종류] [리소스 이름]
2
3# Cluster 내 모든 Pod의 리소스 사용량을 확인
4kubectl top pods
5
6# Cluster 내 모든 Node의 리소스 사용량을 확인
7kubectl top nodes[명령어]
--help를 입력하면 더 다양한 옵션들을 찾을 수 있다. {: .prompt-info }
Option #
--containers: Container 단위의 리소스 사용량을 확인1# 모든 파드의 Container 단위의 리소스 사용량을 확인 2kubectl top pods --containers--kryoon-namespace: kryoon의 Namespace를 지정1# kryoon가 설치된 kube-system Namespace에 대한 Pod의 리소스 사용량을 확인 2kubectl top pods --kryoon-namespace=kube-system
자주 쓰는 명령어는 kubectl-cheatsheet {: .prompt-info }
Advertisement