Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes NetworkPlugin cni无法设置pod_Kubernetes_Project Calico_Calico_Cni - Fatal编程技术网

Kubernetes NetworkPlugin cni无法设置pod

Kubernetes NetworkPlugin cni无法设置pod,kubernetes,project-calico,calico,cni,Kubernetes,Project Calico,Calico,Cni,关于下面我用来描述pod的日志,我的pod由于“FailedCreatePodSandBox”而处于挂起状态 这里有一些关键注意事项: -我用印花布做CNI。 -这个日志重复多次,我刚刚经过这里,这个作为示例。 -ip 192.168.90.152属于入口,129属于k8s弹药库中的舵柄,我不知道k8s为什么试图将其绑定到另一个吊舱上 我在谷歌上搜索了这个问题,这里什么都没有 Warning FailedCreatePodSandBox 2m56s k

关于下面我用来描述pod的日志,我的pod由于“FailedCreatePodSandBox”而处于挂起状态

这里有一些关键注意事项: -我用印花布做CNI。 -这个日志重复多次,我刚刚经过这里,这个作为示例。 -ip 192.168.90.152属于入口,129属于k8s弹药库中的舵柄,我不知道k8s为什么试图将其绑定到另一个吊舱上

我在谷歌上搜索了这个问题,这里什么都没有

  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'

有人能在这个问题上提供帮助吗?

根据CNI网络插件的设计和Kubernetes网络,Calico定义了特殊的IP池
Calico_IPV4POOL_CIDR
,以确定在k8s集群中分配pod IP地址的有效IP范围

当您在特定K8s节点上旋转新Pod时,Calico插件将执行以下操作:

  • 检查该节点上是否存在Pod
  • 从定义的范围内为此Pod分配IP地址 射程
  • 在节点的主机上创建一个虚拟接口并进行相应的配置 连接Pod和Pod之间网络流量的路由规则 容器
  • 在K8s API服务器中注册Pod IP
您可以在相关节点上获取关于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

您是如何将印花布安装为ds的?@bimal vasan是的,作为ds,一个安装在我的工人身上,一个安装在主人身上。您使用哪种版本的印花布?
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