Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox
使用 kubectl describe pods <pod-name> -n <namespace> 命令可看到提示信息。POD启动状态一直为ContainerCreating,提示cni0的IP与既有子网不同。进入到对应计算节点,使用ip a命令确认cni0的IP信息,删除配置文件的"ranges": []中的ipv6相关项。然后关闭ipv6功能后问题解决。关闭ipv6的相关配置。
报错信息:
使用 kubectl describe pods <pod-name> -n <namespace> 命令可看到提示信息
Warning FailedCreatePodSandBox 31m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "d151acda9ff4eed584f91078d556a96026ed0aaf10079c73f3f0c961d6150012": plugin type="bridge" failed (add): failed to set bridge addr: could not add IP address to "cni0": permission denied
POD启动状态一直为ContainerCreating,提示cni0的IP与既有子网不同
进入到对应计算节点,使用ip a命令确认cni0的IP信息,
问题原因(一):
cat /run/flannel/subnet.env
cat /etc/cni/XXX
查看flannel网络插件分配的子网IP,发现两者确实不一致。
问题原因(二):
关闭ipv6的相关配置
vim /etc/cni/net.d/10-containerd-net.conflist
删除配置文件的"ranges": []中的ipv6相关项。
然后关闭ipv6功能后问题解决。
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0
sysctl -w net.ipv6.conf.tun0.disable_ipv6=0
sysctl -p
更多推荐
所有评论(0)