We have an Azure Kubernetes Instance and we created a Private DNS Zone that is a sub-domain of our AD domain (AD domain being mydomain.com). So like:

k8s.mydomain.com

Usually on our other private DNS zones, they reference things like core.windows.net or arc.azure.com etc.

This is the first time we’ve tried doing a sub of our mydomain.com namespace.

I’ve seen on the internet I can just delegate k8s.mydomain.com. The process is create an “A” record for the IP of the Inbound Endpoint of the DNS private Resolver. For the sake of this lets say that’s 10.10.5.5.

So I created an “A” record and called it “azure-k8s-dns.mydomain.com” and pointed it to 10.10.5.5

Then I created a delegation for the zone “k8s” and entered the hostname “azure-k8s-dns.mydomain.com” as the DNS server. And saved it.

If I do an nslookup of the kubernetes test service I have called “store-front” it fails to resolve.

So:

nslookup store-front.k8s.mydomain.com

Returns:
*** dc1.mydomain.com can't find store-front.k8s.mydomain.com: Server failed

However, if I enter:

nslookup store-front.k8s.mydomain.com azure-k8s-dns.mydomain.com

Which tells my nslookup to use that host for DNS it returns:

Server:  UnKnown
Address:  10.10.5.5

Non-authoritative answer:
Name:    store-front.k8s.mydomain.com
Address:  10.224.0.7

(IP of my load balancer out in Azure - so that works)

So I’m not sure why this isn’t working. Is this not possible? Do I just need to not use a sub of mydomain.com for stuff out on Azure?

5 Spice ups