Courseiva
Services and Networking →mediumMultiple Choice

CKAD Services and Networking Practice Question

You have a Service named 'myservice' in namespace 'default'. A pod in the same cluster but different namespace 'other' wants to resolve the service's IP. What DNS name should it use?

⚠ Common exam trap

The trap here is that candidates often forget to include the namespace when the pod is in a different namespace, or they mistakenly swap the order of service and namespace, leading them to choose option B or C.

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

✓

myservice.default.svc.cluster.local

Kubernetes DNS resolves services using the format `<service>.<namespace>.svc.cluster.local`. Since the service 'myservice' is in the 'default' namespace, a pod in the 'other' namespace must include the namespace in the DNS name to reach it. This fully qualified domain name (FQDN) ensures the DNS query resolves to the service's cluster IP, regardless of the pod's namespace.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    myservice.default.svc.cluster.local

    Why this is correct

    This is the correct fully qualified domain name (FQDN) for the service. The Kubernetes DNS naming convention is <service-name>.<namespace>.svc.cluster.local, so 'myservice' in namespace 'default' maps to this exact string. Because it includes the namespace 'default', the name resolves from any namespace in the cluster, making it suitable for cross-namespace access.

  • ✗

    default.myservice.svc.cluster.local

    Why it's wrong here

    Reverses the components of the DNS name, placing the namespace where the service name should be and vice versa. The FQDN would be interpreted as a service named 'default' in a namespace called 'myservice', which likely does not exist. No record is created for this pattern, so DNS resolution fails.

  • ✗

    myservice.svc.cluster.local

    Why it's wrong here

    This name is missing the mandatory namespace segment between the service name and the 'svc' label. The only valid FQDN for a service is 'service.namespace.svc.cluster.local'; while a short name like 'myservice' may work within the same namespace due to search domains, this incomplete 'myservice.svc.cluster.local' is not a record that Kubernetes DNS emits. It will not resolve, even from the same namespace.

  • ✗

    myservice.other.svc.cluster.local

    Why it's wrong here

    This uses 'other' as the namespace instead of the service's actual namespace, 'default'. If a pod in namespace 'other' issues this DNS query, it will look for a service named 'myservice' in the pod's own namespace, not the target service. Since 'myservice' is in 'default', the lookup will fail unless a similarly named service exists in 'other'.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 826 original CKAD 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD 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 CKAD exam.