kubernetes-coredns无法在裸机配置中解析kubernetes.default。

时间:2019-04-02 14:06:43

标签: kubernetes coredns

我已经安装了Kubernetes 1.13和busybox 1.28。软件无法解析kubernetes.default

我尝试了调试coredns问题的步骤 docs。在这些步骤中,只有一件事不起作用。

运行此命令时:

kubectl exec -ti busybox -- nslookup kubernetes.default 

我得到以下答复:

nslookup: can't resolve 'kubernetes.default'

My configuration
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial

kubectl version:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeState:"clean", BuildDate:"2019-01-10T23:35:51Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"linux/amd64"}

coredns logs:
root@-virtual-machine-km1:/home/Helm Phoenix/helm/phoenix/charts/ems-service/templates# kubectl logs -n kube-system coredns-86c58d9df4-5rd5v
.:53
2019-04-02T07:29:40.867Z [INFO] CoreDNS-1.2.6
2019-04-02T07:29:40.867Z [INFO] linux/amd64, go1.11.2, 756749c
CoreDNS-1.2.6
linux/amd64, go1.11.2, 756749c
 [INFO] plugin/reload: Running configuration MD5 = a46567103e4d604a90554621f6f4543d
2019-04-02T07:30:45.106Z [INFO] 192.168.233.190:45899 - 3 "PTR IN 10.0.96.10.in-addr.arpa. udp 41 false 512" NOERROR qr,aa,rd,ra 116 0.000294451s
2019-04-02T07:30:50.395Z [INFO] 127.0.0.1:43612 - 5 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.283827349s
2019-04-02T07:30:50.395Z [INFO] 127.0.0.1:58562 - 5 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.284074988s
2019-04-02T07:30:50.395Z [INFO] 127.0.0.1:35837 - 5 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.28426133s
2019-04-02T07:30:50.395Z [INFO] 192.168.233.190:33653 - 5 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.284488005s
2019-04-02T07:30:50.396Z [INFO] 192.168.233.190:35856 - 6 "AAAA IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,aa,rd,ra 155 0.00007438s
2019-04-02T07:30:55.401Z [INFO] 192.168.233.190:60669 - 8 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.000064724s
2019-04-02T07:30:55.401Z [INFO] 192.168.233.190:35595 - 9 "AAAA IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,rd,ra 155 0.00005702s
2019-04-02T07:30:55.401Z [INFO] 192.168.233.190:43059 - 10 "AAAA IN kubernetes.default.svc.cluster.local. udp 54 false 512" NOERROR qr,aa,rd,ra 147 0.000143421s
2019-04-02T12:46:30.993Z [INFO] 192.168.233.190:41021 - 4 "PTR IN 10.0.96.10.in-addr.arpa. udp 41 false 512" NOERROR qr,aa,rd,ra 116 0.000187245s
2019-04-02T12:46:36.153Z [INFO] 127.0.0.1:36087 - 6 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.155935722s
2019-04-02T12:46:36.153Z [INFO] 192.168.233.190:60655 - 6 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.156584274s
2019-04-02T12:46:36.154Z [INFO] 192.168.233.190:33808 - 7 "AAAA IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,aa,rd,ra 155 0.00016152s
2019-04-02T12:46:36.154Z [INFO] 192.168.233.190:36468 - 8 "AAAA IN kubernetes.default.svc.cluster.local. udp 54 false 512" NOERROR qr,aa,rd,ra 147 0.00018163s
2019-04-02T12:46:36.318Z [INFO] 192.168.233.190:38017 - 9 "A IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.163888573s
2019-04-02T12:46:36.318Z [INFO] 192.168.233.190:41788 - 10 "A IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,aa,rd,ra 155 0.000134254s
2019-04-02T12:46:46.325Z [INFO] 192.168.233.190:41581 - 13 "A IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.000153819s
2019-04-02T12:46:51.329Z [INFO] 192.168.233.190:36899 - 15 "A IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.000088354s
2019-04-02T12:46:51.329Z [INFO] 192.168.233.190:49464 - 16 "A IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,rd,ra 155 0.000038005s
2019-04-02T12:46:51.329Z [INFO] 192.168.233.190:43526 - 17 "A IN kubernetes.default.svc.cluster.local. udp 54 false 512" NOERROR qr,aa,rd,ra 106 0.000092296s
2019-04-02T12:46:51.33Z [INFO] 192.168.233.190:56751 - 18 "PTR IN 1.0.96.10.in-addr.arpa. udp 40 false 512" NOERROR qr,aa,rd,ra 112 0.000105901s
2019-04-02T12:47:21.14Z [INFO] 192.168.233.190:43334 - 4 "PTR IN 10.0.96.10.in-addr.arpa. udp 41 false 512" NOERROR qr,aa,rd,ra 116 0.000176632s
2019-04-02T12:47:21.297Z [INFO] 192.168.233.190:48049 - 5 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.155432306s
2019-04-02T12:47:26.301Z [INFO] 192.168.233.190:51900 - 7 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.000064526s
2019-04-02T12:47:26.301Z [INFO] 192.168.233.190:39077 - 8 "AAAA IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,aa,rd,ra 155 0.000098346s
2019-04-02T12:47:31.305Z [INFO] 192.168.233.190:55662 - 10 "AAAA IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.000128017s
2019-04-02T12:47:31.305Z [INFO] 192.168.233.190:40914 - 11 "AAAA IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,rd,ra 155 0.000085886s
2019-04-02T12:47:51.318Z [INFO] 192.168.233.190:59841 - 16 "A IN kubernetes.default. udp 36 false 512" NXDOMAIN qr,rd,ra 112 0.000908791s
2019-04-02T12:47:51.318Z [INFO] 192.168.233.190:41221 - 17 "A IN kubernetes.default.default.svc.cluster.local. udp 62 false 512" NXDOMAIN qr,aa,rd,ra 155 0.000185325s
2019-04-02T12:48:06.714Z [INFO] 192.168.233.190:40008 - 2 "PTR IN 10.0.96.10.in-addr.arpa. udp 41 false 512" NOERROR qr,aa,rd,ra 116 0.000230135s


expected :kubectl exec -ti busybox -- nslookup kubernetes.default
Server:    10.0.0.10
Address 1: 10.0.0.10

Name:      kubernetes.default
Address 1: 10.0.0.1

actual:
kubectl exec -ti busybox -- nslookup kubernetes.default
Server:    10.0.0.10
Address 1: 10.0.0.10

nslookup: can't resolve 'kubernetes.default'

0 个答案:

没有答案