Environment: kubernetes 1.11 coredns1.0.6 alpine3.8
kubernetes config: ipvs
uname -a
Linux master01 4.18.3-1.el7.elrepo.x86_64 #1 SMP Sat Aug 18 09:30:18 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
error:
/ # nslookup myip
nslookup: can't resolve '(null)': Name does not resolve
Name: myip
Address 1: 10.1.21.161 myip.default.svc.cluster.local
To be clear, assuming everything after "error:" is the output you get, you _are_ getting an answer... Address 1: 10.1.21.161 myip.default.svc.cluster.local .. so you are getting an error and an answer at the same time, probably to two separate questions/queries. nslookup output is just presented in a confusing way.
I suspect it's a AAAA request that nslookup is asking at the same time as the A request for the same name.
You could turn on logging in CoreDNS to verify.
please use dig; nslookup is pretty much useless for dns debugging.
dig: command not found
apk add bind-tools to install dig
If you are on Ubuntu -
apt install dnsutils
Most helpful comment
dig: command not found