k8s 节点 syslog 中很多 orphaned pod 错误

k8s 节点的 /var/log/syslog 中很多 orphaned pod 错误,请问如何解决?

Apr 24 18:36:25 kube-temp7-16c16g kubelet[895]: E0424 18:36:25.518199     895 kubelet_volumes.go:245]
"There were many similar errors. Turn up verbosity to see them." err="orphaned pod \"5b88e89a-7f0b-4bee-8d78-08377fc5889e\" found, but error not a directory occurred when trying to remove the volumes dir" numErrs=3

回答

https://github.com/longhorn/longhorn/issues/3207 的评论 #issuecomment-998810462 中找到了解决方法:

But If replica has been rescheduled to different node and you have dangling vol_data.json you need to go to

var/lib/kubelet/pods/$pod_id/volumes/kubernetes.io~csi/pvc_$pvc_id/

and delete vol_data.json after making sure this is not "live" volume.

进入 /var/lib/kubelet/pods 目录,找出 vol_data.json 文件并删除

cd /var/lib/kubelet/pods
find . -name vol_data.json
rm b88e89a-7f0b-4bee-8d78-08377fc5889e/volumes/kubernetes.io~csi/nas-71ab1eb2-2e29-48af-9f07-b0f4371ede7e/vol_data.json
以上是k8s 节点 syslog 中很多 orphaned pod 错误的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>