Skip to content

Instantly share code, notes, and snippets.

@vwrs
Created April 15, 2020 04:58
Show Gist options
  • Save vwrs/e7b7a1757c5be1b9362c9a1c2fa28b4f to your computer and use it in GitHub Desktop.
Save vwrs/e7b7a1757c5be1b9362c9a1c2fa28b4f to your computer and use it in GitHub Desktop.
delete all failed pods from k8s
kubectl get pods --field-selector=status.phase=Failed | cut -d' ' -f 1 | sed -e '1d' | xargs kubectl delete pod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment