Adding patch command to forceful delete stateful pod (#9627)

This commit is contained in:
Samuel Birocchi 2018-08-01 15:27:39 -03:00 committed by k8s-ci-robot
parent 59554e618c
commit 8f974b4df5
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ If you're using any version of kubectl <= 1.4, you should omit the `--force` opt
kubectl delete pods <pod> --grace-period=0
```
If even after these commands the pod is stuck on `Unknown` state, use the following command to remove the pod from the cluster:
```shell
kubectl patch pod <pod> -p '{"metadata":{"finalizers":null}}'
```
Always perform force deletion of StatefulSet Pods carefully and with complete knowledge of the risks involved.
{{% /capture %}}