Reputation: 3084
How do you hard force a pod to terminate?
We have tried every documented form of kubectl delete pod and they remain. kubectl reports that they've been deleted, but kubectl get pods tells a different story. All pods that they could've been using have been deleted as well as any pods that could be using them.
Is there any form of kubectl SERIOUSLY_DELETE this pod?
I've tried: kubectl delete pods --all --grace-period=0 --force -n monitoring
With no favorable result. I've also tried to delete them individually.
NAME READY STATUS RESTARTS AGE
es-master-962148878-7vxpp 1/1 Terminating 1 12d
es-master-962148878-h1r4k 1/1 Terminating 1 12d
es-master-962148878-rkg9g 1/1 Terminating 1 12d
Upvotes: 1
Views: 3987
Reputation: 272687
Taken from kubectl delete --help
:
kubectl delete pod foo --grace-period=0 --force
Note that if your pods are controlled via e.g. a deployment, then a new one will be recreated every time you delete one. So do make sure that's not the symptom you're observing!
Upvotes: 1