Skip to content

Instantly share code, notes, and snippets.

@diversario
Created July 17, 2018 01:22
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 diversario/e59dbdd79003ff458b9eb2777edd7397 to your computer and use it in GitHub Desktop.
Save diversario/e59dbdd79003ff458b9eb2777edd7397 to your computer and use it in GitHub Desktop.
Useful kubectl one-liners
# get all evicted pods in the cluster
kubectl get pod --all-namespaces --field-selector status.phase=Failed --show-all -o json | jq -r '.items[] | select(.status.reason == "Evicted") | "\(.metadata.namespace)/\(.metadata.name)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment