首页 新闻 会员 周边

K8S 集群的时候,CoreDNS始终多次重启和报错

2
悬赏园豆:30 [待解决问题]

一、 问题描述,如下

请教个问题,搭建K8S 集群的时候,CoreDNS启动失败,遇到如下四个问题,请帮忙回答。
如果有空,请帮忙远程检查和修复问题。
谢谢!

  1. flannel网络设置的etcd网段参数2 (flannel/network/subnets)是多少(demo数据)?

  2. k8s个组件的网段参数2:service-cluster-ip-range是多少(demo数据)?

  3. 几台VM虚拟机(master/node所在VM)的物理网段参数是多少(demo数据)?

  4. 我自己的K8S集群,各个flannel网段(172.16.X.0)和docker网段(172.16.X.1)可以互相ping通。并且kubectl get nodes 和 kubectl get cs 输出正常,但是CoreDNS始终无法正常启动,这个是什么原因啊和如何解决?

摘录kubectl logs输出的错误信息,部分如下:
2019-08-17T11:25:57.053Z [INFO] plugin/reload: Running configuration MD5 = b056aaade1f56d707384640ae1e42ab0
2019-08-17T11:26:03.063Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:57383->192.168.3.1:53: i/o timeout
2019-08-17T11:26:06.065Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:59841->10.3.0.2:53: i/o timeout
2019-08-17T11:26:07.065Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:37073->192.168.3.1:53: i/o timeout
2019-08-17T11:26:08.065Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:45124->192.168.3.1:53: i/o timeout
2019-08-17T11:26:09.066Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:54673->10.3.0.2:53: read: no route to host
E0817 11:26:22.056797 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: i/o timeout
E0817 11:26:24.059736 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:24.059946 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: i/o timeout
E0817 11:26:26.061858 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:26.068540 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:315: Failed to list v1.Service: Get https://10.3.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: i/o timeout
E0817 11:26:28.065420 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:30.069314 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:32.077110 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list
v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:34.082021 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list *v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host

================================================

二、 我的K8S集群信息,如下

<1>. 物理机IP
master : 192.168.3.96 / 192.168.3.97 / 192.168.3.98
node : 192.168.3.99 / 192.168.3.100 / 192.168.3.101


<2>. etcd 设置集群 Pod 网段信息 =写入的 Pod 网段 ${CLUSTER_CIDR} 必须是 /16 段地址,必须与 kube-controller-manager 的 –cluster-cidr 参数值一致;
172.16.0.0/16

set /flannel/network/config '{ "Network":"172.16.0.0/16", "SubnetLen":24, "Backend":{"Type":"vxlan"} }'

-- master
<3>. kube-apiserver
--service-cluster-ip-range=10.3.0.0/16
<4>. kube-controller-manager
--service-cluster-ip-range=10.3.0.0/16

-- node
<5>. kubelet
clusterDomain: "cluster.local"
clusterDNS:"10.3.0.2"
podCIDR: "172.16.0.0/16"

<6>. kube-proxy
clusterCIDR: 172.16.0.0/16

==========================================================

------------------------ 查询cs
[root@CNT7XDCK11D03 ~]# kubectl get cs -o wide
NAME STATUS MESSAGE ERROR
scheduler Healthy ok
controller-manager Healthy ok
etcd-0 Healthy {"health":"true"}
etcd-2 Healthy {"health":"true"}
etcd-1 Healthy {"health":"true"}

------------------------ 查询node
[root@CNT7XDCK11D03 ~]# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
192.168.3.100 Ready 24d v1.14.1 192.168.3.100 CentOS Linux 7 (Core) 3.10.0-693.el7.x86_64 docker://18.9.6
192.168.3.101 Ready 24d v1.14.1 192.168.3.101 CentOS Linux 7 (Core) 3.10.0-693.el7.x86_64 docker://18.9.6
192.168.3.99 Ready 24d v1.14.1 192.168.3.99 CentOS Linux 7 (Core) 3.10.0-693.el7.x86_64 docker://18.9.6

==========================================================
----- 查询所有pod和service等

[root@CNT7XDCK11D01 ~]# kubectl get all --all-namespaces -o wide
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
kube-system pod/coredns-df78489c8-pmsw2 0/1 CrashLoopBackOff 7 20m 172.16.192.2 192.168.3.101 <none> <none>
kube-system pod/dnsutils-ds-bq6hm 1/1 Running 0 19m 172.16.104.2 192.168.3.100 <none> <none>
kube-system pod/dnsutils-ds-bwsf6 1/1 Running 0 19m 172.16.136.2 192.168.3.99 <none> <none>
kube-system pod/dnsutils-ds-l5w92 1/1 Running 0 19m 172.16.192.3 192.168.3.101 <none> <none>

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
default service/kubernetes ClusterIP 10.3.0.1 <none> 443/TCP 2d20h <none>
kube-system service/dnsutils-ds NodePort 10.3.230.39 <none> 80:31427/TCP 19m app=dnsutils-ds
kube-system service/kube-dns ClusterIP 10.3.0.2 <none> 53/UDP,53/TCP,9153/TCP 20m k8s-app=kube-dns

NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE CONTAINERS IMAGES SELECTOR
kube-system daemonset.apps/dnsutils-ds 3 3 3 3 3 <none> 19m my-dnsutils tutum/dnsutils:latest app=dnsutils-ds

NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
kube-system deployment.apps/coredns 0/1 1 0 20m coredns registry.cn-hangzhou.aliyuncs.com/coredns/coredns:1.3.0 k8s-app=kube-dns

NAMESPACE NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR
kube-system replicaset.apps/coredns-df78489c8 1 1 0 20m coredns registry.cn-hangzhou.aliyuncs.com/coredns/coredns:1.3.0 k8s-app=kube-dns,pod-template-hash=df78489c8
[root@CNT7XDCK11D01 ~]#

==========================================================
------ CoreDNS容器启动报错如下:

[root@CNT7XDCK11D02 ~]# kubectl describe pod coredns-df78489c8-pmsw2 -n kube-system
Name: coredns-df78489c8-pmsw2
Namespace: kube-system
Priority: 2000000000
PriorityClassName: system-cluster-critical
Node: 192.168.3.101/192.168.3.101
Start Time: Sat, 17 Aug 2019 19:15:06 +0800
Labels: k8s-app=kube-dns
pod-template-hash=df78489c8
Annotations: seccomp.security.alpha.kubernetes.io/pod: docker/default
Status: Running
IP: 172.16.192.2
Controlled By: ReplicaSet/coredns-df78489c8
Containers:
coredns:
Container ID: docker://a558aea933f2c1383d5c55ab2241c4fa8885ccb6eb8c8b1624b039b699bf091d
Image: registry.cn-hangzhou.aliyuncs.com/coredns/coredns:1.3.0
Image ID: docker-pullable://registry.cn-hangzhou.aliyuncs.com/coredns/coredns@sha256:8ddd47c3d05fd0fd34e8b525d190f39e55e9391db8b63048cf8d3f893c3c44e7
Ports: 53/UDP, 53/TCP, 9153/TCP
Host Ports: 0/UDP, 0/TCP, 0/TCP
Args:
-conf
/etc/coredns/Corefile
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Sat, 17 Aug 2019 19:30:33 +0800
Finished: Sat, 17 Aug 2019 19:32:21 +0800
Ready: False
Restart Count: 7
Limits:
memory: 170Mi
Requests:
cpu: 100m
memory: 70Mi
Liveness: http-get http://:8080/health delay=60s timeout=5s period=10s #success=1 #failure=5
Readiness: http-get http://:8080/health delay=0s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/etc/coredns from config-volume (ro)
/var/run/secrets/kubernetes.io/serviceaccount from coredns-token-54msw (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
config-volume:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: coredns
Optional: false
coredns-token-54msw:
Type: Secret (a volume populated by a Secret)
SecretName: coredns-token-54msw
Optional: false
QoS Class: Burstable
Node-Selectors: beta.kubernetes.io/os=linux
Tolerations: CriticalAddonsOnly
node.kubernetes.io/not-ready:NoExecute for 360s
node.kubernetes.io/unreachable:NoExecute for 360s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 21m default-scheduler Successfully assigned kube-system/coredns-df78489c8-pmsw2 to 192.168.3.101
Normal Pulled 19m (x2 over 21m) kubelet, 192.168.3.101 Container image "registry.cn-hangzhou.aliyuncs.com/coredns/coredns:1.3.0" already present on machine
Normal Created 19m (x2 over 21m) kubelet, 192.168.3.101 Created container coredns
Normal Killing 19m kubelet, 192.168.3.101 Container coredns failed liveness probe, will be restarted
Normal Started 19m (x2 over 21m) kubelet, 192.168.3.101 Started container coredns
Warning Unhealthy 18m (x13 over 20m) kubelet, 192.168.3.101 Readiness probe failed: HTTP probe failed with statuscode: 503
Warning Unhealthy 11m (x26 over 20m) kubelet, 192.168.3.101 Liveness probe failed: HTTP probe failed with statuscode: 503
Warning BackOff 61s (x29 over 8m32s) kubelet, 192.168.3.101 Back-off restarting failed container

================================================================

--- kubectl logs 查看报错日志,如下

[root@CNT7XDCK11D03 ~]# kubectl logs coredns-df78489c8-pmsw2 -n kube-system
E0817 11:16:53.156212 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:16:55.157223 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:315: Failed to list
v1.Service: Get https://10.3.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
.:53
2019-08-17T11:16:57.148Z [INFO] CoreDNS-1.3.0
2019-08-17T11:16:57.148Z [INFO] linux/amd64, go1.11.4, c8f0e94
CoreDNS-1.3.0
linux/amd64, go1.11.4, c8f0e94
2019-08-17T11:16:57.148Z [INFO] plugin/reload: Running configuration MD5 = b056aaade1f56d707384640ae1e42ab0
2019-08-17T11:17:03.151Z [ERROR] plugin/errors: 2 1023968238620899016.4650345280593824491. HINFO: read udp 172.16.192.2:59397->192.168.3.1:53: i/o timeout
[root@CNT7XDCK11D03 ~]# clear
[root@CNT7XDCK11D03 ~]# kubectl logs coredns-df78489c8-pmsw2 -n kube-system
E0817 11:16:53.156212 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:16:55.157223 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:315: Failed to list
v1.Service: Get https://10.3.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
.:53
2019-08-17T11:16:57.148Z [INFO] CoreDNS-1.3.0
2019-08-17T11:16:57.148Z [INFO] linux/amd64, go1.11.4, c8f0e94
CoreDNS-1.3.0
linux/amd64, go1.11.4, c8f0e94
2019-08-17T11:16:57.148Z [INFO] plugin/reload: Running configuration MD5 = b056aaade1f56d707384640ae1e42ab0
2019-08-17T11:17:03.151Z [ERROR] plugin/errors: 2 1023968238620899016.4650345280593824491. HINFO: read udp 172.16.192.2:59397->192.168.3.1:53: i/o timeout
2019-08-17T11:17:06.151Z [ERROR] plugin/errors: 2 1023968238620899016.4650345280593824491. HINFO: read udp 172.16.192.2:53830->10.3.0.2:53: i/o timeout
2019-08-17T11:17:07.153Z [ERROR] plugin/errors: 2 1023968238620899016.4650345280593824491. HINFO: read udp 172.16.192.2:47124->192.168.3.1:53: i/o timeout
2019-08-17T11:17:08.154Z [ERROR] plugin/errors: 2 1023968238620899016.4650345280593824491. HINFO: read udp 172.16.192.2:48943->192.168.3.1:53: i/o timeout
[root@CNT7XDCK11D03 ~]# kubectl logs coredns-df78489c8-pmsw2 -n kube-system
E0817 11:25:53.058250 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:25:55.067465 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:315: Failed to list
v1.Service: Get https://10.3.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
.:53
2019-08-17T11:25:57.053Z [INFO] CoreDNS-1.3.0
2019-08-17T11:25:57.053Z [INFO] linux/amd64, go1.11.4, c8f0e94
CoreDNS-1.3.0
linux/amd64, go1.11.4, c8f0e94
2019-08-17T11:25:57.053Z [INFO] plugin/reload: Running configuration MD5 = b056aaade1f56d707384640ae1e42ab0
2019-08-17T11:26:03.063Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:57383->192.168.3.1:53: i/o timeout
2019-08-17T11:26:06.065Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:59841->10.3.0.2:53: i/o timeout
2019-08-17T11:26:07.065Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:37073->192.168.3.1:53: i/o timeout
2019-08-17T11:26:08.065Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:45124->192.168.3.1:53: i/o timeout
2019-08-17T11:26:09.066Z [ERROR] plugin/errors: 2 5735778573212699307.7857269416742388842. HINFO: read udp 172.16.192.2:54673->10.3.0.2:53: read: no route to host
E0817 11:26:22.056797 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: i/o timeout
E0817 11:26:24.059736 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:24.059946 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: i/o timeout
E0817 11:26:26.061858 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:26.068540 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:315: Failed to list v1.Service: Get https://10.3.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: i/o timeout
E0817 11:26:28.065420 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:30.069314 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:32.077110 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list
v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:26:34.082021 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
[root@CNT7XDCK11D03 ~]# clear
[root@CNT7XDCK11D03 ~]# kubectl logs coredns-df78489c8-pmsw2 -n kube-system
E0817 11:30:34.410070 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list
v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:30:34.410852 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:315: Failed to list v1.Service: Get https://10.3.0.1:443/api/v1/services?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:30:34.414105 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:317: Failed to list
v1.Endpoints: Get https://10.3.0.1:443/api/v1/endpoints?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
E0817 11:30:36.414289 1 reflector.go:205] github.com/coredns/coredns/plugin/kubernetes/controller.go:322: Failed to list *v1.Namespace: Get https://10.3.0.1:443/api/v1/namespaces?limit=500&resourceVersion=0: dial tcp 10.3.0.1:443: connect: no route to host
.:53
2019-08-17T11:30:38.408Z [INFO] CoreDNS-1.3.0
2019-08-17T11:30:38.408Z [INFO] linux/amd64, go1.11.4, c8f0e94
CoreDNS-1.3.0
linux/amd64, go1.11.4, c8f0e94
2019-08-17T11:30:38.408Z [INFO] plugin/reload: Running configuration MD5 = b056aaade1f56d707384640ae1e42ab0

==============================================================

在dnsutils容器内部,nslookup检查K8S内部网络的结果

【docker内部检查网路】

------------- 进入docker内部

root >> docker exec -it 711a236c4148 bash

------------- docker 内部网络配置

root@dnsutils-ds-2nw8g:/# cat /etc/resolv.conf
nameserver 10.3.0.2
search kube-system.svc.kubernetes.default.svc.cluster.local svc.kubernetes.default.svc.cluster.local kubernetes.default.svc.cluster.local home
options ndots:5

------------- docker 内部检查

[root@CNT7XDCK11D05 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
10235c526a9b tutum/dnsutils "sleep 3600" 24 minutes ago Up 24 minutes k8s_my-dnsutils_dnsutils-ds-bq6hm_kube-system_83e0ad8c-c0e0-11e9-87e5-0050562f216a_0
16d59a5bf7cf registry.cn-beijing.aliyuncs.com/k8s_images/pause-amd64:3.1 "/pause" 24 minutes ago Up 24 minutes k8s_POD_dnsutils-ds-bq6hm_kube-system_83e0ad8c-c0e0-11e9-87e5-0050562f216a_0
[root@CNT7XDCK11D05 ~]#
[root@CNT7XDCK11D05 ~]# docker exec -it 10235c526a9b sh

cat /etc/resolv.conf

nameserver 10.3.0.2
search kube-system.svc.cluster.local svc.cluster.local cluster.local home
options ndots:5

nslookup www.baidu.com

;; connection timed out; no servers could be reached

nslookup kubernetes

;; connection timed out; no servers could be reached

nslookup kube-dns.kube-system.svc

;; connection timed out; no servers could be reached

nslookup kube-dns.kube-system.svc.cluster.local

;; connection timed out; no servers could be reached

kubernetes.default.svc.cluster.local

sh: 9: kubernetes.default.svc.cluster.local: not found

ping 10.3.0.2

PING 10.3.0.2 (10.3.0.2) 56(84) bytes of data.
64 bytes from 10.3.0.2: icmp_seq=1 ttl=64 time=0.114 ms
64 bytes from 10.3.0.2: icmp_seq=2 ttl=64 time=0.137 ms
^C
--- 10.3.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.114/0.125/0.137/0.016 ms

ping 10.3.0.1 -c 3

PING 10.3.0.1 (10.3.0.1) 56(84) bytes of data.
64 bytes from 10.3.0.1: icmp_seq=1 ttl=64 time=0.152 ms
64 bytes from 10.3.0.1: icmp_seq=2 ttl=64 time=0.211 ms
64 bytes from 10.3.0.1: icmp_seq=3 ttl=64 time=0.078 ms

--- 10.3.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.078/0.147/0.211/0.054 ms

tiandong的主页 tiandong | 初学一级 | 园豆:163
提问于:2019-08-11 21:02
< >
分享
所有回答(2)
0
set /flannel/network/config '{ "Network":"172.16.0.0/16", "SubnetLen":24, "Backend":{"Type":"vxlan"} }'

其中"Network":"172.16.0.0/16""SubnetLen":24冲突了

kebyn | 园豆:208 (菜鸟二级) | 2020-01-08 19:31
0

我也遇到这个了,我好像是防火墙没关

JimmyTang | 园豆:202 (菜鸟二级) | 2020-06-19 17:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册