Created
January 4, 2021 02:40
-
-
Save techlunacy/27944d7e4665ff427ff8ed80769942ab to your computer and use it in GitHub Desktop.
delete all pods across namespaces borrowed heavily from https://gist.github.com/psxvoid/71492191b7cb06260036c90ab30cc9a0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl get pods --all-namespaces | grep Error | awk '{print $2 " --namespace=" $1}' | xargs -I '{}' bash -c 'kubectl delete pods {}' | |
| kubectl get pods --all-namespaces | grep OOMKilled | awk '{print $2 " --namespace=" $1}' | xargs -I '{}' bash -c 'kubectl delete pods {}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment