简体   繁体   English

Pods 卡住了 containercreating

[英]Pods stuck containercreating

previously my MySQL pod stuck at terminating status, and then I tried to force delete using command like this以前我的 MySQL pod 卡在终止状态,然后我尝试使用这样的命令强制删除

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

Later I tried to helm upgrade again, my pod was stuck at containercreating status, and this event from pod后来我再次尝试helm upgrade ,我的 pod 卡在 containercreating 状态,这个事件来自 pod

17s         Warning   FailedMount   pod/db-mysql-primary-0     MountVolume.SetUp failed for volume "pvc-f32a6f84-d897-4e35-9595-680302771c54" : kubernetes.io/csi: mount
er.SetUpAt failed to check for STAGE_UNSTAGE_VOLUME capability: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix
/var/lib/kubelet/plugins/dobs.csi.digitalocean.com/csi.sock: connect: no such file or directory"

17s         Warning   FailedMount   pod/db-mysql-secondary-0   MountVolume.SetUp failed for volume "pvc-61fc6eda-97fa-455f-ac2c-df8ebcb90f1c" : kubernetes.io/csi: mount
er.SetUpAt failed to check for STAGE_UNSTAGE_VOLUME capability: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix
/var/lib/kubelet/plugins/dobs.csi.digitalocean.com/csi.sock: connect: no such file or directory"

anyone please can help me to resolve this issue, thanks a lot.任何人都可以帮助我解决这个问题,非常感谢。

When you run the command当你运行命令时

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

you ask kubernetes to forget the Pod, not to delete it.您要求 kubernetes 忘记 Pod,而不是删除它。 You have to be careful while using this command.使用此命令时必须小心。 You have to make sure that the containers of the Pod are not running in the host especially when they are mounted to a PVC.您必须确保 Pod 的容器不在主机中运行,尤其是当它们挂载到 PVC 时。 Probably the containers is still running and attached to the PVC.可能容器仍在运行并连接到 PVC。

pool-product-8jd40 0池产品 8jd40 0

spec: drivers: null规格:驱动程序:null

and on my some pool the driver csi not ready (null), it's supposed to be equal 1 (ready)在我的某个池中,驱动程序 csi 未准备好(空),它应该等于 1(准备好)

*sorry i can't attach the image yet *抱歉我还不能附上图片

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM