Skip to content

Instantly share code, notes, and snippets.

@undrafted
Forked from zparnold/one_liner.sh
Last active October 15, 2021 09:26
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 undrafted/34a7868971ba29be2e286d3a41a4eedd to your computer and use it in GitHub Desktop.
Save undrafted/34a7868971ba29be2e286d3a41a4eedd to your computer and use it in GitHub Desktop.
A simple script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment