Skip to content

Instantly share code, notes, and snippets.

@junqueira
Forked from zparnold/one_liner.sh
Created October 2, 2020 21:41
Show Gist options
  • Save junqueira/b8044849790844475548625324adb232 to your computer and use it in GitHub Desktop.
Save junqueira/b8044849790844475548625324adb232 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