CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

CoreDNS and Service Discovery

Resolve one Service four ways, get a headless Service to hand back every Pod IP, and measure the real cost of a short name by counting the queries CoreDNS receives: five for `fleet`, one for the fully qualified name.

Services and Networking Guide 54 of 103 Intermediate

Written against the versions above. The last search domain comes from this lab's DHCP. Yours will differ, and that matters for the ndots count.

All queries run from a netshoot Pod inside the cluster, which is the only place cluster DNS works.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. What a Pod is handed for DNS

  2. One Service, four names, and one that fails

  3. A headless Service hands back the Pods themselves

  4. ndots:5, measured rather than described

  5. The Corefile, plugin by plugin

Official sources