kubeadm安装1.11, coredns解析结果异常


尝鲜,使用kubeadm部署了一套k8s 1.11
1master, 2node集群,按官方文档步骤操作,部署下来一路顺利,但最后测试dns解析时出问题了。

nslookup kuberenetes.default.svc.cluster.local 解析结果正常。
nslookup kubernetes.default 解析不出来结果。

环境信息:
操作系统centos 7.5, docker 1.13, k8s 1.11
NAME                          READY     STATUS    RESTARTS   AGE
coredns-78fcdf6894-zgvtt      1/1       Running   0          1d
etcd-cp0                      1/1       Running   0          1d
kube-apiserver-cp0            1/1       Running   0          1d
kube-controller-manager-cp0   1/1       Running   0          1d
kube-proxy-bkrb8              1/1       Running   0          1d                                  使用的iptables模式
kube-proxy-hp6hj              1/1       Running   0          1d
kube-proxy-sbl2v              1/1       Running   0          1d
kube-router-2bnmf             1/1       Running   1          1d
kube-router-8tq77             1/1       Running   1          1d
kube-router-c6pgj             1/1       Running   1          1d
kube-scheduler-cp0            1/1       Running   0          1d

# kubectl exec -ti busybox-7999f69f9d-b6zzf  -- /bin/sh
/ # nslookup kubernetes.default.svc.cluster.local
Server:         10.96.0.10
Address:        10.96.0.10:53

Name:   kubernetes.default.svc.cluster.local
Address: 10.96.0.1

*** Can't find kubernetes.default.svc.cluster.local: No answer

/ # nslookup kubernetes.default
Server:         10.96.0.10
Address:        10.96.0.10:53

** server can't find kubernetes.default: NXDOMAIN

*** Can't find kubernetes.default: No answer
*** Can't find kubernetes.default: No answer

/ # cat /etc/resolv.conf
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local
options ndots:5

# k get ep kube-dns
NAME       ENDPOINTS                     AGE
kube-dns   10.244.1.2:53,10.244.1.2:53   1d

k describe svc kube-dns

Name:              kube-dns
Namespace:         kube-system
Labels:            k8s-app=kube-dns
               kubernetes.io/cluster-service=true
               kubernetes.io/name=KubeDNS
Annotations:       prometheus.io/port=9153
               prometheus.io/scrape=true
Selector:          k8s-app=kube-dns
Type:              ClusterIP
IP:                10.96.0.10
Port:              dns  53/UDP
TargetPort:        53/UDP
Endpoints:         10.244.1.2:53
Port:              dns-tcp  53/TCP
TargetPort:        53/TCP
Endpoints:         10.244.1.2:53
Session Affinity:  None
Events:            <none>


请教各位高手,哪儿出了问题,如何解决?
已邀请:

要回复问题请先登录注册