0

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?

1
  • There are many reasons for your dns entry not being resolved, like improper kube configs, exposing your endpoints and pod network is not reachable outside. can you share the steps or doc for replicating this issue and go through these troubleshooting steps provided in the official kubernetes documentation. Nov 16 at 12:25

1 Answer 1

0

I use header plugin.

header {
  response set ra
}

This makes work properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .