Skip to content

Instantly share code, notes, and snippets.

@paultyng
Last active September 29, 2016 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paultyng/0efde9cc7faf2f852d3e14188e609393 to your computer and use it in GitHub Desktop.
Save paultyng/0efde9cc7faf2f852d3e14188e609393 to your computer and use it in GitHub Desktop.
Get kubernetes restart counts > 0
kubectl get pods -o json |
jq '.items[] | .metadata.name + " " + (.status.containerStatuses[].restartCount | tostring)' -r |
awk '$2 > 0 { print $1 " " $2 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment