Study. uk . com
  1. Home
  2. All questions
  3. 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.

  1. spec.hostname
  2. spec.nodeName
  3. spec.subdomain
  4. spec.dnsPolicy
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

Challenge yourself on this topic → Study as cards