clico网络问题
来源:1-7 安装dashboard和heapster并验证集群安装结果
慕移动4253767
2020-04-14

现在的集群是 一个master 一个slave ,
master 的运行状态良好。
但是save加入calico/node 的时候 ,获取到的描述信息是
node.kubernetes.io/unschedulable:NoSchedule
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 37m default-scheduler Successfully assigned kube-system/calico-node-9f4mh to instance-esj3coh3
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/cni:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container upgrade-ipam
Normal Started 37m kubelet, instance-esj3coh3 Started container upgrade-ipam
Normal Started 37m kubelet, instance-esj3coh3 Started container install-cni
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/cni:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container install-cni
Normal Started 37m kubelet, instance-esj3coh3 Started container flexvol-driver
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/pod2daemon-flexvol:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container flexvol-driver
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/node:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container calico-node
Normal Started 37m kubelet, instance-esj3coh3 Started container calico-node
Normal Killing 36m kubelet, instance-esj3coh3 Container calico-node failed liveness probe, will be restarted
Warning Unhealthy 36m (x6 over 37m) kubelet, instance-esj3coh3 Readiness probe failed: calico/node is not ready: felix is not ready: Get http://localhost:9099/readiness: dial tcp [::1]:9099: connect: connection refused
Warning Unhealthy 12m (x69 over 37m) kubelet, instance-esj3coh3 Liveness probe failed: calico/node is not ready: Felix is not live: Get http://localhost:9099/liveness: dial tcp [::1]:9099: connect: connection refused
Warning BackOff 2m44s (x93 over 30m) kubelet, instance-esj3coh3 Back-off restarting failed container
kubelet, instance-esj3coh3 Liveness probe failed: calico/node is not ready: Felix is not live: Get http://localhost:9099/liveness: dial tcp [::1]:9099: connect: connection
他获取的不因该是 master的IP吗怎么是localhost了。
我看了master上面 calico绑定的也是 127.0.0.1
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9099 0.0.0.0:* LISTEN 17421/calico-node
tcp 0 0 192.168.0.3:2379 0.0.0.0:* LISTEN 16224/etcd
tcp 0 0 127.0.0.1:2379 0.0.0.0:* LISTEN 16224/etcd
tcp 0 0 192.168.0.3:2380 0.0.0.0:* LISTEN 16224/etcd
tcp 0 0 127.0.0.1:10257 0.0.0.0:* LISTEN 16148/kube-controll
怎么才能绑定外网IP呢。
具体的日志信息
node.kubernetes.io/unschedulable:NoSchedule
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 37m default-scheduler Successfully assigned kube-system/calico-node-9f4mh to instance-esj3coh3
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/cni:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container upgrade-ipam
Normal Started 37m kubelet, instance-esj3coh3 Started container upgrade-ipam
Normal Started 37m kubelet, instance-esj3coh3 Started container install-cni
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/cni:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container install-cni
Normal Started 37m kubelet, instance-esj3coh3 Started container flexvol-driver
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/pod2daemon-flexvol:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container flexvol-driver
Normal Pulled 37m kubelet, instance-esj3coh3 Container image "calico/node:v3.13.2" already present on machine
Normal Created 37m kubelet, instance-esj3coh3 Created container calico-node
Normal Started 37m kubelet, instance-esj3coh3 Started container calico-node
Normal Killing 36m kubelet, instance-esj3coh3 Container calico-node failed liveness probe, will be restarted
Warning Unhealthy 36m (x6 over 37m) kubelet, instance-esj3coh3 Readiness probe failed: calico/node is not ready: felix is not ready: Get http://localhost:9099/readiness: dial tcp [::1]:9099: connect: connection refused
Warning Unhealthy 12m (x69 over 37m) kubelet, instance-esj3coh3 Liveness probe failed: calico/node is not ready: Felix is not live: Get http://localhost:9099/liveness: dial tcp [::1]:9099: connect: connection refused
Warning BackOff 2m44s (x93 over 30m) kubelet, instance-esj3coh3 Back-off restarting failed container
[root@JD addons]# kubectl --namespace kube-system get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
calico-kube-controllers-6898678fbd-wwtql 1/1 Running 0 39m 192.168.29.194 jd <none> <none>
calico-node-9f4mh 0/1 Running 14 38m 172.16.0.4 instance-esj3coh3 <none> <none>
calico-node-qwwpk 1/1 Running 0 39m 192.168.0.3 jd <none> <none>
coredns-8567978547-qf2tk 1/1 Running 0 39m 192.168.29.193 jd <none> <none>
coredns-8567978547-rpnzg 1/1 Running 0 39m 192.168.29.195 jd <none> <none>
etcd-jd 1/1 Running 0 38m 192.168.0.3 jd <none> <none>
kube-apiserver-jd 1/1 Running 0 38m 192.168.0.3 jd <none> <none>
kube-controller-manager-jd 1/1 Running 0 38m 192.168.0.3 jd <none> <none>
kube-proxy-p7lwr 1/1 Running 0 38m 172.16.0.4 instance-esj3coh3 <none> <none>
kube-proxy-tkl9t 1/1 Running 0 39m 192.168.0.3 jd <none> <none>
kube-scheduler-jd 1/1 Running 0 38m 192.168.0.3 jd <none> <none>
[root@JD addons]# netstat -tpnul
写回答
1回答
-
tonybai
2020-04-14
亲,calico不在本课程范围内。但通过你给出的日志来看,你看一下安装calico时,calico的yaml文件中关于相关pod 的readiess和liveness的探针定义是怎么写的。或到calico项目的issue中看看是否有人遇到与你相似的问题了。祝学习愉快!
00
相似问题