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.defaultAnd 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 answerKube-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          20hI'm not sure where to go from here. I would appreciate any help debugging or any documentation that might help.
are you running your mysql server in container under pod or running a CloudSql MySql instance?
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.