创建pod产生network: failed to set bridge addr: “cni0“ already has an IP address different问题记录

kubectl describe pod nginx-ingress-controller-5bb8fb4bb6-62l85 -n ingress-nginx

Normal   Scheduled               40m                     default-scheduler  Successfully assigned ingress-nginx/nginx-ingress-controller-5bb8fb4bb6-62l85 to node1
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "2bb48732ddda565dd4519d80beb07c441ae199184d84cdf715dc27915ad64ae9" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "a813912777636af0a5e0de6a94b4fc96e9a548301a4872153cf4872330d5f3d9" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "f9f105a6b0d07565df76fe753b06bfbca884f82b9c20ae64efa1577296414c6c" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "c2470f9ac75c93d84023997330700b4f47e2e04b12aa78080cc2681cf2cd4a8b" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "f3d2501b4a23c1786b4f1b1b81a8f007abd202fd7090026f1f5462d2ed4e931c" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "a423522635f2521d674c1e8175c1677900f4def4596c2729383e7549bf075010" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "046a1574c8ce12e69d17e9b5f4fdb20a55886c307e6ee8252a2d679faa09b5d8" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "425c28254259b9ca1587b25cbeb7f3a716dd78a1aef75694ad237abb65a2e5de" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  40m                     kubelet, node1     Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "4f0eb7a7bd81cfdb7c40c5e2a9624e7311571a02261779c956f75c9ff2ed82d3" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Warning  FailedCreatePodSandBox  5m22s (x1989 over 40m)  kubelet, node1     (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "e3665bc402c21c01cdce2edf686a5850bcc5f61f37136726ea8f5df5ad744a23" network for pod "nginx-ingress-controller-5bb8fb4bb6-62l85": networkPlugin cni failed to set up pod "nginx-ingress-controller-5bb8fb4bb6-62l85_ingress-nginx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
  Normal   SandboxChanged          23s (x2280 over 40m)    kubelet, node1     Pod sandbox changed, it will be killed and re-created.

自我总结了下,node1自己因为二进制部署出了问题node节点加入了一到两次
期间没有没有重启到docker,导致原油的网络与现有的网络冲突
使用的是 flannel网络布局
一下操作在发生问题的node1节点上进行

ifconfig cni0 down
ifconfig flannel.1 down
ifconfig docker0 down
ip link delete cni0
ip link delete flannel.1

systemctl restart docker
  Normal  Scheduled  28m   default-scheduler  Successfully assigned ingress-nginx/nginx-ingress-controller-5bb8fb4bb6-ksk8g to node1
  Normal  Pulled     28m   kubelet, node1     Container image "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0" already present on machine
  Normal  Created    28m   kubelet, node1     Created container nginx-ingress-controller
  Normal  Started    28m   kubelet, node1     Started container nginx-ingress-controller

github上面给出的解决办法
https://github.com/kubernetes/kubernetes/issues/39557

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值