KCNA Kubernetes Fundamentals Practice Question
A pod named 'db' in the 'default' namespace cannot connect to another pod named 'cache' in the 'prod' namespace via DNS. The service 'cache-svc' exists in the 'prod' namespace. What DNS name should the 'db' pod use to reach the 'cache-svc' service?
⚠ Common exam trap
CNCF often tests the misconception that the namespace alone (e.g., 'cache-svc.prod') is sufficient for cross-namespace DNS resolution, but the full 'svc.cluster.local' suffix is mandatory for the cluster DNS to resolve the service correctly.
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
✓
cache-svc.prod.svc.cluster.local
Kubernetes DNS resolves services across namespaces using the format <service>.<namespace>.svc.cluster.local. Since the 'cache-svc' service is in the 'prod' namespace, the 'db' pod in the 'default' namespace must use 'cache-svc.prod.svc.cluster.local' to reach it. The default cluster domain is 'cluster.local', and the 'svc' subdomain is part of the standard DNS schema for services.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
cache-svc.default
Why it's wrong here
Incorrect namespace and incomplete domain.
- ✗
cache-svc.prod
Why it's wrong here
This is incomplete; it may not resolve without the full cluster domain.
- ✓
cache-svc.prod.svc.cluster.local
Why this is correct
The correct DNS format for a service in another namespace is <svc>.<ns>.svc.cluster.local.
- ✗
cache-svc.default.svc.cluster.local
Why it's wrong here
This uses the wrong namespace (default instead of prod).
Visual reference
Go deeper
Related to this question
Learn chapter
Kubernetes Overview and Core Components
Key term
ReplicaSet and Replication
A ReplicaSet ensures a specified number of identical pod instances are running at all times in Kubernetes, using replication to maintain availability and stability.
Key term
Namespaces
A Namespace in Kubernetes is a virtual cluster within a physical cluster that allows you to organize and isolate resources, like an apartment building with separate units for different tenants.
About these practice questions
This KCNA question is part of Courseiva's 833-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.