Kubernetes实战:Kubernetes中网络插件calico Daemon Sets显示异常红色

目录

  • 一、排查步骤与解决方案
    • 1.1、POD排查+问题定位
    • 1.2、针对问题解决错误
    • 1.3、继续针对问题解决错误

一、排查步骤与解决方案

1.1、POD排查+问题定位

我的k8s集群由3个节点组成的,calico在每个节点上都有一个pod,通过kubectl get pod -A命令发现有一个pod的READY 为0/1,STATUS为Running,初步怀疑就是这个有问题。通过 kubectl logs 命令查询日志并没有发现问题。然后通过查询资料使用下面命令,发现了下面问题。

kubectl describe pod calico-node-hjjd2  -n kube-system
Warning  Unhealthy  15m   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  15m   kubelet            Readiness probe failed: 2024-02-16 14:24:32.035 [INFO][165] confd/health.go 180: Number of node(s) with BGP peering established = 0

终于定位到了问题。

1.2、针对问题解决错误

然后通过博文Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to 使用命令ip delete docker0 删除DOWN状态的网卡,然后删除pod自动重启pod,然后又发现了如下报错

Warning  Unhealthy  2s (x2 over 12s)  kubelet  (combined from similar events): Readiness probe failed: 2024-02-16 14:52:31.291 [INFO][439] 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 192.168.1.8,192.168.1.9

1.3、继续针对问题解决错误

然后通过博文K8S集群Calico网络组件报错BIRD is not ready: BGP not established with 使用命令ip delete br-e173ff1f198e 删除dr-开头的网卡,然后删除pod自动重启pod。通过kubectl get pod -A观察pod的状态已正常,然后看Kubernetes Daemon Sets中calico已显示正常。大功告成!!

你可能感兴趣的:(Kubernetes,kubernetes,网络,容器)