Skip to content

Instantly share code, notes, and snippets.

@hodrigohamalho
Last active January 21, 2020 16:01
Show Gist options
  • Save hodrigohamalho/8ee693804e731af60620fc550e1b3f5d to your computer and use it in GitHub Desktop.
Save hodrigohamalho/8ee693804e731af60620fc550e1b3f5d to your computer and use it in GitHub Desktop.
delete all pods in crash loop back error state
# 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