I configured new Coredns in kubernetes and exposed it to LoadBalancer of service. Also I added a dns server to my local laptop. This is my new zone.
nlabs.hosts nlabs.io:53 {
hosts {
10.0.0.1 nlabs.io
10.0.0.2 superman.nlabs.io
10.0.0.3 babo.nlabs.io
ttl 300
fallthrough
}
reload 5s
whoami
}
I ran this command (X.X.X.X is an IP obtained through a LoadBalancer of service.)
nslookup nlabs.io X.X.X.X
So I got this result.
Server: X.X.X.X
Address: X.X.X.X#53
Name: nlabs.io
Address: 10.0.0.1
But I ran this command
nslookup nlabs.io
I got this result.
;; Got recursion not available from X.X.X.X, trying next server
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
Name: nlabs.io
Address: 188.165.246.188
This is my resolv.conf
nameserver Y.Y.Y.Y
nameserver X.X.X.X
nameserver 192.168.0.1
Why does this happen?