CKA Services and Networking Practice Question
Which of the following is the default DNS name for a Service named 'api' in namespace 'production'?
⚠ Common exam trap
The trap here is that candidates often forget the `svc` subdomain or confuse the order of namespace and service name, leading them to choose options like A or C, which omit or misplace the `svc` component.
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.production.svc.cluster.local
In Kubernetes, the default DNS name for a Service follows the pattern `<service>.<namespace>.svc.cluster.local`. For a Service named 'api' in namespace 'production', this resolves to `api.production.svc.cluster.local`. The `svc` subdomain is a fixed component that distinguishes Service DNS records from Pod DNS records, and `cluster.local` is the default cluster domain.
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.production.cluster.local
Why it's wrong here
This record lacks the mandatory `svc` segment in the DNS hierarchy. Kubernetes CoreDNS only serves service A/AAAA records under the `<service>.<namespace>.svc.<cluster-domain>` zone; `api.production.cluster.local` falls outside the `svc.cluster.local` zone and therefore cannot resolve to the Service's ClusterIP. Without `svc`, this name is not a valid Service DNS record.
- ✓
api.production.svc.cluster.local
Why this is correct
This is the canonical fully qualified Domain Name (FQDN) for a Service. For a Service named `api` in Namespace `production`, CoreDNS registers an A record at `api.production.svc.cluster.local` using the standard schema `<service-name>.<namespace>.svc.<cluster-domain>`. Pods inside the cluster can resolve this name to the Service's ClusterIP, making it the default and correct Service DNS name.
- ✗
production.api.svc.cluster.local
Why it's wrong here
The order of the labels is reversed: the Service name must come first, followed by the Namespace, then `svc`. This name would be parsed as a Service named `production` in Namespace `api`, which is not the intended Service and almost certainly does not exist. Even if it did, it would not be the default name for a Service called `api` in Namespace `production`.
- ✗
api.svc.production.cluster.local
Why it's wrong here
The `svc` keyword is placed before the Namespace, disrupting the required label order `<service>.<namespace>.svc.<cluster-domain>`. In this string, `svc` occupies the Namespace position, making the record actually refer to a Service named `api` in a Namespace called `svc` — not `api` in `production`. Additionally, the `production` label appears after `svc`, so the record does not match any Zone served by CoreDNS for ordinary Services.
Visual reference
Go deeper
Related to this question
Learn chapter
Installing Kubernetes with kubeadm
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
About these practice questions
Courseiva writes every CKA question from scratch — 726 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 CKA 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 CKA exam.