发现calico始终在crashloopbackoff怎么办?

来源:10-2 Scheduler--- 玩转pod调度(上)

alexhjl

2019-09-23

[root@m1 ~]# kubectl get pods -n kube-system

NAME                                   READY   STATUS             RESTARTS   AGE

calico-node-gts97                      2/2     Running            3          3d3h

calico-node-shhw2                      2/2     Running            169        3d3h

calico-node-sxd7m                      2/2     Running            13         3d3h

calico-node-vn8nw                      1/2     CrashLoopBackOff   8          20m


尝试过:

kubectl delete pod calico-node-vn8nw 

但是没用



[root@m1 ~]# kubectl describe pod/calico-node-vn8nw -n kube-system

Events:

  Type     Reason     Age                   From               Message

  ----     ------     ----                  ----               -------

  Normal   Scheduled  22m                   default-scheduler  Successfully assigned kube-system/calico-node-vn8nw to m1

  Normal   Pulled     22m                   kubelet, m1        Container image "quay.io/calico/cni:v3.1.3" already present on machine

  Normal   Created    22m                   kubelet, m1        Created container install-cni

  Normal   Started    22m                   kubelet, m1        Started container install-cni

  Normal   Started    22m (x4 over 22m)     kubelet, m1        Started container calico-node

  Normal   Pulled     21m (x5 over 22m)     kubelet, m1        Container image "quay.io/calico/node:v3.1.3" already present on machine

  Normal   Created    21m (x5 over 22m)     kubelet, m1        Created container calico-node

  Warning  BackOff    2m48s (x98 over 22m)  kubelet, m1        Back-off restarting failed container



 kubectl logs  pod/calico-node-vn8nw -n kube-system --tail=100 calico-node 

2019-09-23 14:56:15.350 [INFO][8] startup.go 251: Early log level set to info

2019-09-23 14:56:15.351 [INFO][8] startup.go 267: Using NODENAME environment for node name

2019-09-23 14:56:15.351 [INFO][8] startup.go 279: Determined node name: m1

2019-09-23 14:56:15.355 [INFO][8] startup.go 302: Checking datastore connection

2019-09-23 14:56:15.366 [INFO][8] startup.go 326: Datastore connection verified

2019-09-23 14:56:15.366 [INFO][8] startup.go 99: Datastore is ready

2019-09-23 14:56:15.380 [INFO][8] startup.go 564: Using autodetected IPv4 address on interface br-6240848ac6ce: 172.18.0.1/16

2019-09-23 14:56:15.380 [INFO][8] startup.go 432: Node IPv4 changed, will check for conflicts

2019-09-23 14:56:15.387 [WARNING][8] startup.go 861: Calico node 'm2' is already using the IPv4 address 172.18.0.1.

2019-09-23 14:56:15.387 [INFO][8] startup.go 205: Clearing out-of-date IPv4 address from this node IP="172.18.0.1/16"

2019-09-23 14:56:15.399 [WARNING][8] startup.go 1058: Terminating

Calico node failed to start


应该是ip地址冲突了。


写回答

1回答

刘果国

2019-09-24

2019-09-23 14:56:15.380 [INFO][8] startup.go 564: Using autodetected IPv4 address on interface br-6240848ac6ce: 172.18.0.1/16

这个网桥不正确,如果没用的话就删掉(br-6240848ac6ce)

0
3
刘果国
回复
alexhjl
这个一般是部署其他非k8s服务时创建的,是否有用得先具体定位一下哪个服务创建的,在看看这个服务是否还有用
2019-09-25
共3条回复

Kubernetes生产落地全程实践

一个互联网公司落地Kubernetes全过程点点滴滴

2293 学习 · 2216 问题

查看课程