Skip to content

Instantly share code, notes, and snippets.

@paultyng
Last active September 29, 2016 20:57
Show Gist options
  • Select an option

  • Save paultyng/0efde9cc7faf2f852d3e14188e609393 to your computer and use it in GitHub Desktop.

Select an option

Save paultyng/0efde9cc7faf2f852d3e14188e609393 to your computer and use it in GitHub Desktop.

Revisions

  1. paultyng renamed this gist Sep 29, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. paultyng created this gist Sep 29, 2016.
    3 changes: 3 additions & 0 deletions restart-counts.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    kubectl get pods -o json |
    jq '.items[] | .metadata.name + " " + (.status.containerStatuses[].restartCount | tostring)' -r |
    awk '$2 > 0 { print $1 " " $2 }'