Spot frequently restarting containers quickly.
Section: JSONPath and Useful One-Liners
List pods with restart counts
bash
bash
kubectl get pods -A -o custom-columns=NS:.metadata.namespace,POD:.metadata.name,RESTARTS:.status.containerStatuses[*].restartCountLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing JSONPath and Useful One-Liners
Show which node each pod runs on
Correlate pod failures with node placement.
List images used by all pods
Find image tags currently running in the cluster.
Show not-ready pods
Filter pods whose Ready condition is false or missing.
Show pod CPU and memory usage
Requires metrics-server; useful for resource-based incidents.