DNS may be messed up on new GKE clusters

8/18/2018

I've spent many hours over the past few days trying to understand why one of my pods can't reach a mysql service running in the cluster. I can provide service configs if necessary, but my debugging effort led me to check DNS using this documentation.

So from within a busybox pod running in my cluster, I tried the following command:

nslookup kubernetes.default

And got the following:

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

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

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

Kube-dns is running

$ kubectl get pods --namespace=kube-system -l k8s-app=kube-dns

NAME                        READY     STATUS    RESTARTS   AGE
kube-dns-5dcfcbf5fb-jgcxj   4/4       Running   0          20h
kube-dns-5dcfcbf5fb-t4wds   4/4       Running   0          20h

I'm not sure where to go from here. I would appreciate any help debugging or any documentation that might help.

-- Tyler Jones
google-cloud-platform
google-kubernetes-engine
kubernetes

2 Answers

8/22/2018

are you running your mysql server in container under pod or running a CloudSql MySql instance?

-- Narendra
Source: StackOverflow

8/18/2018

It turns out I was too hasty to debug DNS, and the busybox bug mentioned by @Jukka threw me off.

Following the steps in the Debug Services docs, I was able to confirm that DNS is in fact working.

Will continue to investigate why my service is unreachable.

-- Tyler Jones
Source: StackOverflow