Hands-on Lab·Certified Kubernetes Administrator
Pod DNS Policy and dnsConfig
The file the kubelet writes into every Pod, the two settings that decide how a name is resolved, and the one combination where the spec field and the file disagree.
Services and Networking Guide 55 of 103 Advanced
- Kubernetes1.36.4
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 17 min
- Reviewed26 August 2026
Written against the versions above. The search list ends in this lab's domain. Everything about ndots and dnsPolicy behaves the same anywhere.
| 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
- guide 54 - what answers these queries, before this covers how they are asked.
-
What a normal Pod gets handed
-
Three ways to write the same name
-
The trap: hostNetwork and cluster DNS
-
The one line that fixes it
-
Tuning ndots, and what it costs