Courseiva
Services and Networking →mediumMultiple Choice

CKA Services and Networking Practice Question

In a Kubernetes cluster using CoreDNS, what is the DNS name for a Service named 'api' in namespace 'backend'?

⚠ Common exam trap

It's easy for candidates to confuse the order of service and namespace, or omit the `svc` subdomain, because they think the namespace alone is sufficient for DNS resolution.

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.backend.svc.cluster.local

In Kubernetes, CoreDNS resolves Service DNS names using the format `<service>.<namespace>.svc.cluster.local`. For a Service named 'api' in namespace 'backend', the fully qualified DNS name is `api.backend.svc.cluster.local`. This allows Pods to discover the Service via DNS, with CoreDNS serving as the cluster DNS provider.

Answer analysis

Option-by-option breakdown

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

  • ✗

    backend.api.svc.cluster.local

    Why it's wrong here

    This string reverses the service and namespace labels. In Kubernetes DNS, the service name comes first, followed by the namespace, so 'backend.api.svc.cluster.local' would be interpreted as a service named 'backend' in a namespace called 'api'. Unless such a service actually exists, it will not resolve; the intended service is 'api' in the 'backend' namespace, so this is incorrect.

  • ✓

    api.backend.svc.cluster.local

    Why this is correct

    This is the correct fully qualified domain name for a Service. CoreDNS serves the record in the format '<service>.<namespace>.svc.<cluster-domain>', so 'api' is the service, 'backend' is the namespace, and 'svc' marks this as a Service record. It resolves to the Service's ClusterIP, allowing pods to reach it with a stable DNS name.

  • ✗

    api.backend.cluster.local

    Why it's wrong here

    This omits the mandatory 'svc' subdomain that separates Service records from other record types in CoreDNS. The standard hierarchy is <service>.<namespace>.svc.<cluster-domain>; without 'svc', the name is not a valid Service DNS entry and CoreDNS will typically return NXDOMAIN. It cannot be used for cross-namespace service discovery.

  • ✗

    api.svc.backend.cluster.local

    Why it's wrong here

    Here the fixed 'svc' segment is inserted between the service name and the namespace, producing an invalid ordering. The FQDN hierarchy requires the namespace immediately after the service, with 'svc' as the next level down, i.e., <service>.<namespace>.svc.<cluster.local>. This string would be parsed as a service named 'api' under a subdomain 'svc.backend', which is not how CoreDNS namespaces Service records.

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

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 →

How Courseiva writes practice questions · Editorial policy

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.