Help Center> Cloud Container Engine> FAQ> Workload> Workload Abnormalities> What Should I Do If Pods in the Terminating State Cannot Be Deleted?

What Should I Do If Pods in the Terminating State Cannot Be Deleted?

Symptom

When a node is in the Unavailable state, CCE migrates container pods on the node and sets the pods running on the node to the Terminating state.

After the node is restored, the pods in the Terminating state are automatically deleted.

However, some pods remain in the Terminating state.

Running kubectl delete pods <podname> -n <namespace> cannot delete the pods.

kubectl delete pods aos-apiserver-5f8f5b5585-s9l92 -n aos

Solution

You can run the following command to forcibly delete the pods created in any ways:

kubectl delete pods <pod> --grace-period=0 --force

Therefore, you can run the following command to delete the pod:

kubectl delete pods aos-apiserver-5f8f5b5585-s9l92 --grace-period=0 --force

Submitting a Service Ticket

If the problem persists, submit a service ticket.