As the title states, I am having an issue with resolving service names within my K8's cluster.
As per this question, I created a busybox pod and tried to resolve an existing service name using nslookup nginx-service
. I get the error: ;; connection timed out; no servers could be reached
I also tried the instructions on the official K8's documentation on how to debug DNS issues. As it states, I tried to do an nslookup kubernetes.default
but got the same error as before.
Listed below is some information:
1) Output of cat /etc/resolv.conf
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local
reddog.microsoft.com
options ndots:5
2) Result of kubectl get pods --namespace=kube-system -l k8s-app=kube-dns
NAME READY STATUS RESTARTS AGE
coredns-5c98db65d4-5nprd 1/1 Running 0 3d22h
coredns-5c98db65d4-5vw95 1/1 Running 0 3d22h
3) Output of for p in $(kubectl get pods --namespace=kube-system -l k8s-app=kube-dns -o name); do kubectl logs --namespace=kube-system $p; done
.:53
2019-07-22T18:39:37.208Z [INFO] CoreDNS-1.3.1
2019-07-22T18:39:37.208Z [INFO] linux/amd64, go1.11.4, 6b56a9c
CoreDNS-1.3.1
linux/amd64, go1.11.4, 6b56a9c
2019-07-22T18:39:37.208Z [INFO] plugin/reload: Running configuration MD5 = 5d5369fbc12f985709b924e721217843
.:53
2019-07-22T18:39:37.245Z [INFO] CoreDNS-1.3.1
2019-07-22T18:39:37.245Z [INFO] linux/amd64, go1.11.4, 6b56a9c
CoreDNS-1.3.1
linux/amd64, go1.11.4, 6b56a9c
2019-07-22T18:39:37.245Z [INFO] plugin/reload: Running configuration MD5 = 5d5369fbc12f985709b924e721217843
For what it's worth, since I know that the DNS server is at 10.96.0.10
when I try to ping that IP, I don't get a response.
EDIT: Output of dig @10.96.0.10 nginx-service
; <<>> DiG 9.11.3 <<>> @10.96.0.10 nginx-service
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached