Skip to content

Instantly share code, notes, and snippets.

@ohmrefresh
Last active January 27, 2020 09:28
Show Gist options
  • Save ohmrefresh/185bd0c41f9727d110d72e69d3ad4f54 to your computer and use it in GitHub Desktop.
Save ohmrefresh/185bd0c41f9727d110d72e69d3ad4f54 to your computer and use it in GitHub Desktop.
##Kill pods
for pod in $(oc get pods | egrep 'Error|MatchNodeSelector|CrashLoopBackOff' | awk '{print $1}'); do oc delete pod --grace-period=0 "${pod}"; done
##Kill pods force kill same as kill -9
for pod in $(oc get pods | egrep 'Error|MatchNodeSelector|CrashLoopBackOff' | awk '{print $1}'); do oc delete pod --grace-period=0 "${pod}" --force; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment