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
- Kubernetes1.36.4
- CoreDNSv1.14.2
- Cluster4 nodes
- CNICalico v3.32.1
- TimeAbout 35 min
- Reviewed21 August 2026
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.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
Before you start
- The Services guide, since every name below resolves to a Service.
- A shell Pod with DNS tools.
nicolaka/netshootis used throughout;nslookupanddigare not in normal application images. - The EndpointSlices guide, for why a headless Service returns the addresses it does.
-
What a Pod is handed for DNS
-
One Service, four names, and one that fails
-
A headless Service hands back the Pods themselves
-
ndots:5, measured rather than described
-
The Corefile, plugin by plugin