当前位置: 首页 > news >正文

calico/node is not ready: BIRD is not ready: BGP not established with xxx

发现calico有个节点没有正常运行

集群的某个节点没有Runing的报错内容

kubectl describe po -n calico-system  calico-node-bt6q2Warning  Unhealthy  61s (x2 over 62s)  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 refusedWarning  Unhealthy  36s                kubelet            Readiness probe failed: 2025-06-05 07:46:49.763 [INFO][406] node/health.go 202: Number of node(s) with BGP peering established = 1
calico/node is not ready: BIRD is not ready: BGP not established with xxx

查看路由

root@k8s-master:/home/k8s# kubectl exec -it -n calico-system calico-node-bt6q2 -- grep 'router id' /etc/calico/confd/config/bird.cfg
Defaulted container "calico-node" out of: calico-node, flexvol-driver (init), install-cni (init)
router id 10.4.0.1;

正常情况是要返回本机ip的

kubectl exec -it -n calico-system calico-node-bt6q2 -- grep 'router id' /etc/calico/confd/config/bird.cfg
Defaulted container "calico-node" out of: calico-node, flexvol-driver (init), install-cni (init)
router id 10.4.0.1;
root@k8s-master:/home/k8s# kubectl exec -it -n calico-system calico-node-2zvg9 -- grep 'router id' /etc/calico/confd/config/bird.cfg
Defaulted container "calico-node" out of: calico-node, flexvol-driver (init), install-cni (init)
router id 10.231.xxx;
root@k8s-master:/home/k8s# kubectl exec -it -n calico-system calico-node-rwlsx -- grep 'router id' /etc/calico/confd/config/bird.cfg
Defaulted container "calico-node" out of: calico-node, flexvol-driver (init), install-cni (init)
router id 10.231.xxx; 

这是典型的 Calico 自动探测主机 IP 不一致导致的 router ID 异常

Calico 默认使用first-found探测模式,会找“第一个符合条件”的非回环、非 docker 网卡的 IP。有时会因为以下因素导致

出现 router id = 10.4.0.1 的可能原因:

1、节点的第一个网卡是cni0、docker0或者nerdctl0这类虚拟网卡;

2、节点的主机 IP 没有被正确识别(例如没有绑定在主网卡上,或者主网卡排序靠后);

3、节点上的容器网络配置与其它节点略有不同(如顺序或网卡名);

4、没有通过IP_AUTODETECTION_METHOD 限定只选物理网卡,导致探测机制选错。

 由于我是通过tigera-operator部署的,所以需要修改installation default

cat custom-resources.yaml 
# This section includes base Calico installation configuration.
# For more information, see: https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.Installation
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:name: default
spec:# Configures Calico networking.registry: 仓库地址imagePath: 仓库路径calicoNetwork:nodeAddressAutodetectionV4:interface: "bond0"ipPools:- name: default-ipv4-ippoolblockSize: 26cidr: 10.244.0.0/16encapsulation: VXLANCrossSubnetnatOutgoing: EnablednodeSelector: all()---# This section configures the Calico API server.
# For more information, see: https://docs.tigera.io/calico/latest/reference/installation/api#operator.tigera.io/v1.APIServer
apiVersion: operator.tigera.io/v1
kind: APIServer
metadata:name: default
spec: {}

重启

 kubectl delete -f custom-resources.yaml

 kubectl apply -f custom-resources.yaml

恢复正常

如果不是我的方法部署的相同的道理

那就修改calico.yaml,apply即可

- name: CLUSTER_TYPEvalue: "k8s,bgp"# Specify interface- name: IP_AUTODETECTION_METHODvalue: "interface=网卡名"

 

http://www.lqws.cn/news/148879.html

相关文章:

  • 使用 Docker Compose 安装 PostgreSQL 16
  • 网络安全面试题目(无答案)
  • Tailwind CSS 实战:基于 Kooboo 构建 AI 对话框页面(七):消息框交互功能添加
  • 招工招聘系统开发,重塑人才招聘新格局
  • Life:Internship finding
  • 【6.2-6.9学习周报】
  • SpringBoot EhCache 缓存
  • 国产linux系统(银河麒麟,统信uos)使用 PageOffice在线编辑word文件保存数据同时保存文件
  • NVM!(可以快速替换你的node版本)
  • 无人机军用与民用技术对比分析
  • 购物商城网站 Java+Vue.js+SpringBoot,包括商家管理、商品分类管理、商品管理、在线客服管理、购物订单模块
  • 神经网络与深度学习 网络优化与正则化
  • vue3+ts+vite:详细、完整的 tsconfig.json 示例 / 常见配置项及其用途
  • 在word中点击zotero Add/Edit Citation没有反应的解决办法
  • 【HTML】HTML 与 CSS 基础教程
  • 低功耗高安全:蓝牙模块在安防系统中的应用方案
  • python版若依框架开发:项目结构解析
  • 使用Node.js分片上传大文件到阿里云OSS
  • 【深度学习】为什么2个3×3的卷积可以相当于一个5×5的卷积核?为什么3个3×3的卷积相当于一个7×7的卷积核,到底区别在哪里?我们该如何使用?
  • 从零搭建到 App Store 上架:跨平台开发者使用 Appuploader与其他工具的实战经验
  • 金融系统功能测试:科技赋能,安全护航
  • 总结HTML中的文本标签
  • 深入浅出玩转物联网时间同步:基于BC260Y的NTP实验与嵌入式仿真教学革命
  • HTML中各种标签的作用
  • Apache Doris + MCP:Agent 时代的实时数据分析底座
  • OrCAD X Capture CIS设计小诀窍系列第二季--03.如何在Capture中输出带有目录和元器件信息的PDF
  • javaweb -html -CSS
  • 专业级PDF转CAD解决方案
  • php apache构建 Web 服务器
  • 使用Python提取PDF元数据的完整指南