错误
今天不知道怎么回事,一台机器的calico-node报错,也就是无法初始化正常
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 45s default-scheduler Successfully assigned kube-system/calico-node-pkbkv to k8s-node2
Normal Started 45s kubelet Started container install-cni
Normal Pulled 45s kubelet Container image "docker.io/calico/cni:v3.20.0" already present on machine
Normal Started 45s kubelet Started container upgrade-ipam
Normal Pulled 45s kubelet Container image "docker.io/calico/cni:v3.20.0" already present on machine
Normal Created 45s kubelet Created container install-cni
Normal Created 45s kubelet Created container upgrade-ipam
Normal Started 44s kubelet Started container flexvol-driver
Normal Pulled 44s kubelet Container image "docker.io/calico/pod2daemon-flexvol:v3.20.0" already present on machine
Normal Created 44s kubelet Created container flexvol-driver
Normal Pulled 43s kubelet Container image "docker.io/calico/node:v3.20.0" already present on machine
Normal Created 43s kubelet Created container calico-node
Normal Started 43s kubelet Started container calico-node
Warning Unhealthy 40s kubelet Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused
Warning Unhealthy 30s kubelet Readiness probe failed: 2021-09-15 02:36:49.282 [INFO][417] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with 172.17.6.120,172.17.6.121,172.17.6.122
Warning Unhealthy 20s kubelet Readiness probe failed: 2021-09-15 02:36:59.282 [INFO][497] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with 172.17.6.120,172.17.6.121,172.17.6.122
Warning Unhealthy 10s kubelet Readiness probe failed: 2021-09-15 02:37:09.280 [INFO][567] confd/health.go 180: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with 172.17.6.120,172.17.6.121,172.17.6.122
解决办法
# Remove interfaces related to docker and flannel:
ip link
# For each interface for docker or flannel, do the following
ip link delete <name of interface from ip link>
移除这台主机多余的docker网卡和calico
然后从重新删除这个错误pod的,就会恢复正常
造成问题的原因是,Calico使用了错误的网桥导致网络无法连通,所以我们从根本上解决问题需要指定Calico识别网桥的规则,否则过了一段时间问题还会再次出现,可以参照这篇文章解决根本问题: 文章来源:https://www.toymoban.com/news/detail-729128.html
Calico 网络故障排查 calico/node is not ready: BIRD is not ready(指定Calico匹配网桥规则)文章来源地址https://www.toymoban.com/news/detail-729128.html
到了这里,关于Calico 报错 calico/node is not ready: BIRD is not ready: BGP not established with(导致 K8S 集群网络无法使用)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!