Courseiva
Services and Networking →mediumMultiple Choice

CKA Services and Networking Practice Question

A Kubernetes cluster has a Service of type ClusterIP named 'my-svc' in the 'default' namespace. You deploy a pod and want it to resolve the service's cluster IP using DNS. What FQDN should the pod use?

⚠ Common exam trap

The trap here is that candidates often forget the `svc` subdomain or the namespace, picking a shorter form like `my-svc.cluster.local`, which is not a valid Kubernetes Service FQDN.

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

The standard FQDN for a Kubernetes Service is `<service-name>.<namespace>.svc.cluster.local`. This DNS record resolves to the ClusterIP of the Service, allowing pods to reach it via DNS. The `svc` subdomain is a fixed part of the cluster domain, distinguishing Service records from pod records.

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.pods.cluster.local

    Why it's wrong here

    The domain .pods.cluster.local is specifically reserved for pod DNS records, not services. A pod's FQDN is derived from its IP address (e.g., 10-244-0-1.default.pod.cluster.local), whereas a ClusterIP service is registered under the .svc subdomain. Because my-svc is a service, the name my-svc.default.pods.cluster.local will not resolve; it belongs to a different DNS namespace.

  • ✗

    my-svc.cluster.local

    Why it's wrong here

    This option omits the mandatory namespace and .svc components of a service DNS name. The complete FQDN pattern for a service is <service-name>.<namespace>.svc.<cluster-domain>; without those middle elements, my-svc.cluster.local is not a registered DNS record. While an unqualified service name may work as a short name within the same namespace, the fully qualified name is required for cross-namespace or absolute resolution.

  • ✓

    my-svc.default.svc.cluster.local

    Why this is correct

    This is the standard, fully qualified DNS name for a Kubernetes service. CoreDNS creates an A record for every ClusterIP service under <service-name>.<namespace>.svc.<cluster-domain>, so with the service in the default namespace and the standard cluster.local domain, my-svc.default.svc.cluster.local correctly resolves to the service's ClusterIP. Applications can use this FQDN both within and outside the namespace to reach the service.

  • ✗

    my-svc.default.svc.cluster.com

    Why it's wrong here

    The cluster domain used by Kubernetes DNS is cluster.local by default, as configured by the --cluster-domain flag in kubelet and the cluster's DNS settings. The suffix .cluster.com is not part of any standard Kubernetes configuration; it would only be valid if someone deliberately customized the cluster domain to .com, which is not indicated here. Therefore, this record will fail DNS resolution for the ClusterIP service.

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.