Print pod restart counts.
Section: JSONPath Output Recipes
List pod restart counts
bash
bash
kubectl get pods -n payments -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.containerStatuses[*].restartCount}{"\n"}{end}'Explanation
Print pod restart counts.
Learn 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 Output Recipes