k8s删除pod报错device or resource busy
在对应node上执行:ip netns list 报错如下。
·
pod报错如下:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Killing 29m kubelet Stopping container shenyu-bootstrap
Warning FailedKillPod 29m kubelet error killing pod: failed to "KillPodSandbox" for "f77484af-0b4e-4ac4-ba57-9064a852a5b8" with KillPodSandboxError: "rpc error: code = Unknown desc = failed to remove network namespace for sandbox \"e28d9be282c30540c3d0e213ad77ad5333c224484e905a12c3ed3e0c13a89416\": failed to remove netns: unlinkat /run/netns/cni-e58e41e6-f0e6-0d05-a7b7-3ef9f9a85a5b: device or resource busy"
Warning FailedSync 4m6s (x115 over 29m) kubelet error determining status: rpc error: code = Unknown desc = failed to get sandbox ip: check network namespace closed: remove netns: unlinkat /var/run/netns/cni-e58e41e6-f0e6-0d05-a7b7-3ef9f9a85a5b: device or resource busy
在对应node上执行:ip netns list 报错如下
[root@k8s-prod-node1 ~]# ip netns list
RTNETLINK answers: Invalid argument
cni-36884ea3-df06-860b-acda-ce986f21b3d2 (id: 6)
cni-f9b7fff3-1048-92e5-0489-a5c01ca942fc (id: 5)
cni-df7cf70b-905c-151c-39e2-71a8ae7f06c8 (id: 4)
cni-c8cb8823-1333-fb29-f3a2-2fead7b3ae93 (id: 3)
RTNETLINK answers: Invalid argument
cni-61523776-fdad-2326-377a-ceb0884cda07
cni-a07a134a-be56-283d-f4e2-cd1214f27cdd (id: 1)
cni-326d2cc7-d1bc-facf-b96c-596222b66689 (id: 0)
解决方法:
[root@k8s-prod-node1 ~]# echo 1 > /proc/sys/fs/may_detach_mounts
更多推荐
已为社区贡献2条内容
所有评论(0)