Courseiva
Services and Networking →mediumMultiple Choice

CKA Services and Networking Practice Question

A pod cannot resolve a Service name 'my-svc' in the same namespace. The DNS pod is running. What is a likely cause?

⚠ Common exam trap

Watch out — candidates often confuse DNS resolution issues with network connectivity issues, incorrectly attributing the failure to kube-proxy or Service type, when the root cause is simply that the Service object does not exist and thus has no DNS record.

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

✓

The Service 'my-svc' does not exist

If the Service 'my-svc' does not exist, the CoreDNS pod will not have an A/AAAA record for it, and DNS resolution will fail with NXDOMAIN. The pod's DNS resolver queries the cluster's DNS service (typically CoreDNS) for the Service name; if no matching Service object is defined, no DNS record is created, and the name cannot be resolved regardless of other components being healthy.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The kube-proxy is not running

    Why it's wrong here

    kube-proxy is responsible for programming iptables or IPVS rules that forward traffic to Service ClusterIPs, but it has no role in DNS resolution. DNS queries for Service names are handled entirely by CoreDNS (or kube-dns), which reads Service objects directly from the Kubernetes API. If kube-proxy were down, the name would still resolve to the ClusterIP, and the failure would manifest as connection timeouts or refused connections, not as a DNS NXDOMAIN error.

  • ✗

    The Service type is ExternalName

    Why it's wrong here

    A Service of type ExternalName is created specifically to provide a DNS CNAME record that points to an external host. For example, my-svc.default.svc.cluster.local would resolve to the target name via a CNAME response rather than returning NXDOMAIN. Therefore, the Service type being ExternalName does not cause the pod to be unable to resolve the name; the name would still resolve, even though the actual target may be outside the cluster.

  • ✓

    The Service 'my-svc' does not exist

    Why this is correct

    CoreDNS generates DNS records only for Service objects that actually exist. If no Service named my-svc exists in the pod's namespace, the query for my-svc.<namespace>.svc.cluster.local returns NXDOMAIN, which is exactly the failure described. Because the short name my-svc is expanded using the pod's search domains to include the namespace, a missing Service object means no A record can be synthesized. Running kubectl get svc -n <namespace> to confirm that the Service is present is the correct first troubleshooting step.

  • ✗

    The pod is in a different namespace

    Why it's wrong here

    Within the same namespace, the short name my-svc resolves correctly because the pod's resolv.conf includes search domains such as <namespace>.svc.cluster.local. If the Service were in a different namespace, the short name would fail because it would be tried against the pod's own namespace first and not automatically find the other namespace. However, the question explicitly states that the pod and the Service are in the same namespace, so this explanation cannot apply; a cross-namespace issue would require a fully qualified name like my-svc.other-namespace.svc.cluster.local.

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

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 →

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.