Skip to content

Instantly share code, notes, and snippets.

View palonsoro's full-sized avatar

Pablo Alonso Rodriguez palonsoro

View GitHub Profile
@palonsoro
palonsoro / delete-failed-pods.sh
Created June 11, 2019 10:51
Delete all the failed pods on an OpenShift cluster
#!/bin/bash
oc get pod -o wide --all-namespaces --field-selector=status.phase=Failed -o template --template '{{range .items}}-n {{.metadata.namespace}} {{.metadata.name}}{{"\n"}}{{end}}' | xargs -n3 oc delete pod