kubectl common command

คำสั่งที่ใช้กันปกติ

View list pods

$ kubectl get po or kubectl get pod (-n [namespace] -o wide)

View service

$ kubectl get svc or kubectl get service (-n [namespace] -o wide)

View deploy

$ kubectl get deploy (-n [namespace] -o wide)

View Statefulset

$ kubectl get statefulset (-n [namespace] -o wide)

View Ingress

$ kubectl get ingress (-n [namespace] -o wide)

View pvc

$ kubectl get pvc (-n [namespace] -o wide)

Or view all

$ kubectl get all (-n [namespace] -o wide)

View used cpu or memory

$ kubectl top po (-n [namespace] --sort-by=memory/cpu)

Comments are closed.