Check requests and limits
Show resource requests and limits for each container
kubectl get pod mypod -o jsonpath='{range .spec.containers[*]}{.name}{"\t"}{.resources}{"\n"}{end}'
- tool
- k8s-debug27 commands
More k8s-debug commands
-
kubectl describe node my-node | grep -A5 'Conditions:'Check the node conditions: Ready, MemoryPressure, DiskPressure
-
kubectl top pods -A --sort-by=memory | head -20Show the top 20 pods by memory usage
-
kubectl get events -n mynamespace --field-selector involvedObject.name=mypod --watchStream events for one pod as they happen
-
kubectl cp mynamespace/mypod:/var/log/app.log ./app.logDownload a file from a running container
-
kubectl get po -A --sort-by='.status.containerStatuses[0].restartCount' | tail -20Sort pods across the cluster by restart count to spot crash loops fast