- Home
- All questions
- Question 778
CKA study material · question 778 of 1000
Which two Pod spec fields shape the DNS name a Pod is given under a headless Service? Choose two.
Show the answer
Answer: A. spec.hostname
C. spec.subdomain
hostname overrides the Pod's metadata.name as the hostname, and subdomain places the Pod under a headless Service's domain; together they produce its DNS name.
Source: DNS for Services and Pods (Kubernetes) — Pods › Pod's hostname and subdomain fields