[英]Pod not terminating
We have a Rancher Kubernetes cluster where sometimes the pods get stuck in terminating
status when we try to delete the corresponding deployment, as shown below. 我们有一个Rancher Kubernetes集群,当我们尝试删除相应的部署时,有时pod会陷入
terminating
状态,如下所示。
$ kubectl get deployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE ... storage-manager-deployment 1 0 0 0 1d ... $ kubectl delete deployments storage-manager-deployment kubectl delete deployments storage-manager-deployment deployment.extensions "storage-manager-deployment" deleted Cc Cc^C $ kubectl get po NAME READY STATUS RESTARTS AGE ... storage-manager-deployment-6d56967cdd-7bgv5 0/1 Terminating 0 23h ... $ kubectl delete pods storage-manager-deployment-6d56967cdd-7bgv5 --grace-period=0 --force warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. pod "storage-manager-deployment-6d56967cdd-7bgv5" force deleted Cc Cc^C
Both the delete commands (for the deployment
and the pod
) get stuck and need to be stopped manually. 删除命令(用于
deployment
和pod
)都被卡住,需要手动停止。
We have tried both 我们都尝试过
kubectl delete pod NAME --grace-period=0 --force
and 和
kubectl delete pod NAME --now
without any luck. 没有任何运气。
We have also set fs.may_detach_mounts=1
, so it seems that all the similar questions already on StackOverflow don't apply to our problem. 我们还设置了
fs.may_detach_mounts=1
,因此似乎StackOverflow上所有类似的问题都不适用于我们的问题。
If we check the node on which the incriminated pod runs, it does not appear in the docker ps
list. 如果我们检查在其中运行了该Pod的节点,则该节点不会出现在
docker ps
列表中。
Any suggestion? 有什么建议吗?
Thanks 谢谢
Check the pod spec for an array: 'finalizers' 检查Pod规范中的数组:“ finalizers”
finalizers:
- cattle-system
If this exists, remove it, and the pod will terminate. 如果存在,请将其移除,然后吊舱将终止。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.