CKA Services and Networking Practice Question
What is the default DNS name for a service named 'my-svc' in namespace 'default'?
⚠ Common exam trap
The trap here is that candidates often forget the `svc` subdomain or the namespace component, leading them to pick options that omit one or both, such as A, B, or D, while the correct pattern always includes `<service>.<namespace>.svc.cluster.local`.
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
✓
my-svc.default.svc.cluster.local
In Kubernetes, the default DNS name for a service follows the pattern `<service-name>.<namespace>.svc.cluster.local`. For a service named 'my-svc' in the 'default' namespace, the fully qualified domain name (FQDN) is `my-svc.default.svc.cluster.local`. This is defined by the cluster DNS specification (CoreDNS or kube-dns) and allows pods to resolve the service by name within the cluster.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
my-svc.default.cluster.local
Why it's wrong here
my-svc.default.cluster.local omits the mandatory '.svc' subdomain that designates the service namespace within the cluster's DNS zone. In CoreDNS, the zone for cluster services is '<namespace>.svc.cluster.local', and a name without '.svc' falls outside this zone, so kube-dns/CoreDNS will not have a record for it. Even though it includes the correct namespace 'default', the missing '.svc' makes the FQDN invalid for service resolution.
- ✗
my-svc.svc.cluster.local
Why it's wrong here
my-svc.svc.cluster.local leaves out the namespace, which is a required component of any service DNS record. Because services are namespaced objects, CoreDNS maintains a separate subzone for each namespace under '.svc.cluster.local', e.g., 'default.svc.cluster.local'. Without the namespace label, the name tries to resolve a service named 'my-svc' directly under the '.svc' subdomain, but no such record exists.
- ✓
my-svc.default.svc.cluster.local
Why this is correct
my-svc.default.svc.cluster.local is the canonical fully-qualified domain name for a Service named 'my-svc' created in the 'default' namespace. The pattern is '<service-name>.<namespace>.svc.cluster.local', and it maps to the cluster IP of that Service. This is the DNS name that kube-dns/CoreDNS exposes and that pods use to reach the service via stable cluster-local DNS.
- ✗
my-svc.cluster.local
Why it's wrong here
my-svc.cluster.local is missing both the namespace and the '.svc' subdomain, so it does not correspond to any record in the cluster's DNS zone. The cluster domain 'cluster.local' is the parent zone, and services are defined under '<namespace>.svc.cluster.local', not directly beneath the top-level cluster domain. This name would fail resolution because there is no object registered at that path.
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
CoreDNS
CoreDNS is a fast, flexible, and pluggable Domain Name System (DNS) server that is often used as the cluster DNS for Kubernetes, translating service names into IP addresses so containers can find each other.
About these practice questions
This CKA question is part of Courseiva's 726-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 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.