Skip to content

Instantly share code, notes, and snippets.

@marcosvidolin
Last active August 3, 2019 15:36
Show Gist options
  • Save marcosvidolin/db83186672444c91d5e522aabbd76aac to your computer and use it in GitHub Desktop.
Save marcosvidolin/db83186672444c91d5e522aabbd76aac to your computer and use it in GitHub Desktop.
kubectl get po --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains("Evicted")) | "kubectl delete po \(.metadata.name) -n \(.metadata.namespace)"' | xargs -n 1 bash -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment