Skip to content

Instantly share code, notes, and snippets.

@namcxn
Forked from zparnold/one_liner.sh
Created September 27, 2021 17:58
Show Gist options
  • Select an option

  • Save namcxn/17be903c76557e234929e6e0e8e1e786 to your computer and use it in GitHub Desktop.

Select an option

Save namcxn/17be903c76557e234929e6e0e8e1e786 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