k8s calico-node错误日志 listen tcp: lookup localhost on 8.8.4.4:53: no such host
项目场景:K8s搭建问题描述:查看pods状态 `kubectl get pods --all-namespaces`发现calico-node异常[root@k8s-master ~]# kubectl get pods --all-namespacesNAMESPACENAMEREADYSTATUSRESTARTSAGEkube-system
·
项目场景:
K8s搭建
问题描述:
查看pods状态,发现 calico-node异常[root@k8s-master ~]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system calico-node-m5s7m 0/1 Running 0 25s
kube-system calico-node-s959x 0/1 Running 0 12s
查看日志提示 :
listen tcp: lookup localhost on 8.8.4.4:53: no such host
原因分析:
localhost未设置映射
解决方案:
添加localhost映射:vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
删除calico-node,重启 :kubectl delete pod calico-node-实际名称 -n kube-system
查看 :kubectl get pods --all-namespaces -o wide
[root@k8s-master ~]# kubectl get pods --all-namespaces -o wide
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
kube-system calico-node-bs8tr 1/1 Running 0 35m 192.168.200.16 k8s-master <none> <none>
kube-system calico-node-wltbq 1/1 Running 0 34m 192.168.200.17 k8s-worker <none> <none>
更多推荐
已为社区贡献1条内容
所有评论(0)