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?
- A.kafka-0.kafka-hl.stream.svc.cluster.local
- B.kafka-1.stream.kafka-hl.svc.cluster.local
- C.kafka.kafka-hl-0.stream.pod.cluster.local
- 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
- Generating a Pod manifest skeleton
- Downward API Pod IP as env
- fsGroup for shared volume ownership
- Indexed Job completion index
- Pulling and unpacking a chart locally
- Kustomize namePrefix and references
- Watching Pod status changes live
- tcpSocket probe for a non-HTTP server
- ExternalName Service for an outside host
- Ways to consume a Secret in a container
- Checking quota usage in a namespace