关于下面我用来描述Pod的日志,由于“ FailedCreatePodSandBox”,我的Pod处于挂起状态
有一些主要注意事项: -我将印花布用作CNI。 -此日志重复了很多时间,我只是在这里将其作为示例。 -ip 192.168.90.152属于入口,而129属于k8的监视NS中的分er,我不知道为什么k8试图将其绑定到另一个Pod。
我用谷歌搜索了这个问题,但我什么都没得到。
Warning FailedCreatePodSandBox 2m56s kubelet, worker-dev Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "2abca59b55efb476723ec9c4402ede6e3a6ee9aed67ecd19c3ef5c7719ae51f1" network for pod "service-stg-8d9d68475-2h4b8": NetworkPlugin cni failed to set up pod "service-stg-8d9d68475-2h4b8_stg" network: error adding host side routes for interface: cali670b0a20d66, error: route (Ifindex: 10688, Dst: 192.168.90.152/32, Scope: 253) already exists for an interface other than 'cali670b0a20d66'
Warning FailedCreatePodSandBox 2m53s kubelet, worker-dev Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "ec155fd442c0ea09b282a13c4399ae25b97d5c3786f90f1a045449b52ced4cb7" network for pod "service-stg-8d9d68475-2h4b8": NetworkPlugin cni failed to set up pod "service-stg-8d9d68475-2h4b8_stg" network: error adding host side routes for interface: cali670b0a20d66, error: route (Ifindex: 10691, Dst: 192.168.90.129/32, Scope: 253) already exists for an interface other than 'cali670b0a20d66'
任何人都可以帮助解决这个问题吗?
答案 0 :(得分:0)
根据CNI网络插件的设计并根据Kubernetes网络model,Calico定义了特殊IP池CIDR CALICO_IPV4POOL_CIDR
,以确定哪些有效的IP范围可用于分配Pod IP地址跨k8s集群。
当您在特定的K8s节点上旋转新Pod时,Calico插件将执行以下操作:
您可以在相关节点上获取有关Calico虚拟接口的数据,即:
$ ip link | grep cali
cali80d3ff89956@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1440 qdisc noqueue state UP mode DEFAULT group default
calie58f9d521fb@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1440 qdisc noqueue state UP mode DEFAULT group default
为了估计当前问题,您可以考虑查询Calico install-cni
Pod的容器日志并检索有关特定Pod service-stg-8d9d68475-2h4b8
的数据,搜索现有的虚拟接口映射:
kubectl logs $(kubectl get po -l k8s-app=calico-node -o jsonpath='{.items[0].metadata.name}' -n kube-system) -c calico-node -n kube-system| grep service-stg-8d9d68475-2h4b8_stg