KCNA Kubernetes Fundamentals Practice Question
A developer reports that a Pod cannot reach another Service in the same namespace via its DNS name. The Service name is 'api'. What is the correct DNS query for a Pod to resolve this Service?
⚠ Common exam trap
Watch out — candidates often assume the full FQDN (e.g., 'api.svc.cluster.local') is always required, forgetting that DNS search domains in the Pod's resolv.conf enable short-name resolution within the same namespace.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
api
When a Pod and a Service are in the same namespace, Kubernetes DNS resolves the Service using just the Service name (e.g., 'api'). The DNS search domain configured in the Pod's resolv.conf (e.g., <namespace>.svc.cluster.local) appends the namespace and cluster suffix automatically, so a short query like 'api' resolves correctly without needing the full FQDN.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
api.svc.cluster.local
Why it's wrong here
Missing the namespace.
- ✗
api.namespace.svc.cluster.local
Why it's wrong here
This would work if the namespace were known, but the shortest correct answer is 'api'.
- ✓
api
Why this is correct
Within the same namespace, the short name works.
- ✗
api.default.svc.cluster.local
Why it's wrong here
The namespace is not 'default' unless it is; the question states the same namespace, so the short name is sufficient.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 833 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This KCNA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the KCNA exam.