Kubernetes version 1.13.2
Issue description
I encountered the problem that when delete statefulset
the execution hangs, for example:
1 | kubectl delete statefulset is-en-conductor |
it cannot delete the statefulset
and associated pods
at all
1 | [root@opsft-lb-1 OpenShift] oc get all |
Solution
1 | kubectl delete statefulsets <statefulset name> --force --grace-period=0 --cascade=false |
now we only have hanging pods, force delete them
1 | NAME READY STATUS RESTARTS AGE |
1 | kubectl delete pod <pod name> --force --grace-period=0 |