Last active
January 21, 2020 16:01
-
-
Save hodrigohamalho/8ee693804e731af60620fc550e1b3f5d to your computer and use it in GitHub Desktop.
delete all pods in crash loop back error state
This file contains 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
# From your host, SSH as ec2-user into the bastion server | |
# ssh -i /path/ocpkey.pem \ | |
# ec2-user@bastion.NAME-GUID.open.redhat.com | |
# Become root on the bastion server | |
#sudo -i | |
oc get pods --all-namespaces | grep Crash | awk '{ printf ("oc delete pod %5s\t -n %s\n", $2, $1) }' | while read -r line ; do $line; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment