I encountered the problem that when delete statefulset
the execution hangs, for example:bash
kubectl delete statefulset is-en-conductor
it cannot delete the statefulset
and associated pods
at allcode
[root@opsft-lb-1 OpenShift] oc get all NAME DESIRED CURRENT AGE statefulsets/is-en-conductor 0 1 5h statefulsets/is-engine-compute 0 2 5h NAME READY STATUS RESTARTS AGE po/is-en-conductor-0 0/1 Terminating 2 1h po/is-engine-compute-0 1/1 Running 0 5h po/is-engine-compute-1 0/1 Terminating 0 5h
kubectl delete statefulsets <statefulset name> --force --grace-period=0 --cascade=false
now we only have hanging pods, force delete themip
NAME READY STATUS RESTARTS AGE po/is-en-conductor-0 0/1 Terminating 2 1h po/is-engine-compute-0 1/1 Running 0 5h po/is-engine-compute-1 0/1 Terminating 0 5h
kubectl delete pod <pod name> --force --grace-period=0