- 参考的calico官网,安装calico过程如下:
(1)、tigera-operator.yaml和custom-resources.yaml文件下载到服务器上
(2)、执行kubectl create -f tigera-operator.yaml,安装过程未报错
(3)、修改配置文件custom-resources.yaml,加入如下配置内容
nodeAddressAutodetectionV4:
interface: ens33
确定所有网卡是ens33
(4)、执行kubectl create -f custom-resources.yaml,安装过程未报错
(5)、查看calico相关pod,pod处于running状态
NAME READY STATUS RESTARTS AGE
calico-kube-controllers-6696b5fc97-hlb84 1/1 Running 0 2m33s
calico-node-28flc 1/1 Running 0 2m34s
calico-node-p9tcg 1/1 Running 0 2m34s
calico-typha-9f54f8447-sgpnl 1/1 Running 0 2m34s
csi-node-driver-67h28 2/2 Running 0 2m33s
csi-node-driver-wgwvs 2/2 Running 0 2m33s
(6)、执行7.
kubectl taint nodes --all node-role.kubernetes.io/control-plane-
```,结果如下:
```xml
taint "node-role.kubernetes.io/control-plane" not found
taint "node-role.kubernetes.io/control-plane" not found
后查看pod状态也正常
2.查看calico pod相关信息始终报错:
Normal Pulling 27m kubelet Pulling image "docker.io/calico/pod2daemon-flexvol:v3.28.2"
Normal Scheduled 27m default-scheduler Successfully assigned calico-system/calico-node-rhrj9 to dk8s-work1
Normal Pulled 27m kubelet Successfully pulled image "docker.io/calico/pod2daemon-flexvol:v3.28.2" in 10.195808051s
Normal Created 27m kubelet Created container flexvol-driver
Normal Started 27m kubelet Started container flexvol-driver
Normal Pulling 27m kubelet Pulling image "docker.io/calico/cni:v3.28.2"
Normal Started 26m kubelet Started container install-cni
Normal Pulled 26m kubelet Successfully pulled image "docker.io/calico/cni:v3.28.2" in 51.718175648s
Normal Created 26m kubelet Created container install-cni
Normal Pulling 26m kubelet Pulling image "docker.io/calico/node:v3.28.2"
Normal Pulled 25m kubelet Successfully pulled image "docker.io/calico/node:v3.28.2" in 50.979018706s
Normal Created 25m kubelet Created container calico-node
Normal Started 25m kubelet Started container calico-node
Warning Unhealthy 25m 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 25m kubelet Readiness probe failed: 2024-11-06 07:59:09.401 [INFO][231] confd/health.go 202: Number of node(s) with BGP peering established = 0
calico/node is not ready: BIRD is not ready: BGP not established with 192.168.100.186
或:
Warning Unhealthy 42m 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/bird/bird.ctl: connect: no such file or directory
```xml
其它说明:
custom-resources.yaml即使不加入配置nodeAddressAutodetectionV4:
interface: ens33
也报同样的错误。
工作节点端口查看如下看上去似乎已经建立了连接:
netstat -ltunp | grep 179
tcp 0 0 0.0.0.0:179 0.0.0.0:* LISTEN 12607/bird
lsof -i:179
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bird 12607 root 7u IPv4 68970 0t0 TCP *:bgp (LISTEN)
bird 12607 root 8u IPv4 76064 0t0 TCP dk8s-work1:bgp->dk8s-work2:55595 (ESTABLISHED)
/var/run/bird/bird.ctl文件calico刚部署完是存在的,但是重启节点后不存在了
通过ip link命令查看没有br开头的多余虚拟网卡,并且删除了一部分state DOWN的网卡也没起作用,一直的bird的错误。
版本信息如下:OS:CENTOS7,
calico version:v3.28.2
K8S:v1.21.10
网上搜索了几个方法(如加入nodeAddressAutodetectionV4识别网卡的配置)均不起作用,请教如何处理此错误