Managed Kubernetes
Latest
Forcefully Delete Kubernetes Pod
Problem
A pod is stuck in terminating state as per the Kubectl output.
Deletion of pod fails even after running the command.
$ kubectl delete pod [pod_name] -n [namespace] --grace-period 0
Environment
Platform9 Managed Kubernetes - All Versions
Procedure
Verify that the container(s) associated with the pod isn't running on the node. This can be verified by identifying the container and the node name using the command below.
$ kubectl describe pod [pod_name] -n [namespace]
SSH into the node and verify that that the container associated isn't running by running the following command.
See this article for more details on containerd commands.
$ docker ps
$ ctr -n k8s.io containers list
Once it's verified that the container isn't present, run the following command to delete the pod forcefully.
$ kubectl delete pod [pod_name] -n [namespace] --grace-period 0 --force
Last updated on
Was this page helpful?
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered by
