CertKeen

Certified Kubernetes Application Developer (CKAD) · Free practice question 10 of 12

StatefulSet per-Pod DNS name

StatefulSet `kafka` at Morwenstow Data uses headless Service `kafka-hl` in namespace `stream`, with the default cluster domain. What is the DNS name of the first broker Pod?

  1. A.kafka-0.kafka-hl.stream.svc.cluster.local
  2. B.kafka-1.stream.kafka-hl.svc.cluster.local
  3. C.kafka.kafka-hl-0.stream.pod.cluster.local
  4. D.kafka-hl-0.kafka.stream.svc.cluster.local
Show answer and explanation

Correct answer: A. kafka-0.kafka-hl.stream.svc.cluster.local

Why: StatefulSet Pods are named <statefulset>-<ordinal> starting at 0 and get records of the form <pod>.<governing-service>.<namespace>.svc.<cluster-domain>. The other options swap the Service and StatefulSet names, start at ordinal 1, or use the wrong label order.

More free Certified Kubernetes Application Developer (CKAD) questions