孤儿Volume问题

Nov  7 09:32:03 k8work2 kubelet: E1107 09:32:03.431224   13241 kubelet_volumes.go:154] Orphaned pod "f6a977f4-2098-11eb-90a3-2c534a095a16" found, but volume paths are still present on disk : There were a total of 1 errors similar to this. Turn up verbosity to see them.

进入到/var/lib/kubelet/pods/,通过id号,进入kubelet的目录,可以发现里面还存在容器的数据,etc-hosts文件中还保留着pod名称等信息。

从错误信息可以推测,这台计算节点存在一个孤儿Pod,并且该Pod挂载了数据卷(volume),阻碍了Kubelet对孤儿Pod正常的回收清理。所以一直在提示上面错误信息,我在确认该Pod确认该Pod确实已经不在运行,并且没有数据丢失的风险,直接执行了rm -rf f6a977f4-2098-11eb-90a3-2c534a095a16,删除过后,不在刷此类错误。

⚠️:切记,删除前,确认 pod 信息。是否还在用,是否被分配到其他work机器;