Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Forked from zparnold/one_liner.sh
Created November 8, 2020 15:18
Show Gist options
  • Save developer-guy/70eee5588b6e243f39e367f53177bf8c to your computer and use it in GitHub Desktop.
Save developer-guy/70eee5588b6e243f39e367f53177bf8c to your computer and use it in GitHub Desktop.
A simply 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