Courseiva
Services and NetworkingeasyMultiple ChoiceObjective-mapped

CKA Services and Networking Practice Question

Which DNS record type does Kubernetes use to resolve a Service's ClusterIP?

⚠ Common exam trap

It's easy for candidates to confuse SRV records (used for headless Services with named ports) with the standard A record resolution for ClusterIP Services, or mistakenly think CNAME records are used for internal Service 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

A record

Kubernetes uses A records to resolve a Service's ClusterIP. When a DNS query is made for a Service name (e.g., `my-svc.my-namespace.svc.cluster.local`), the cluster's DNS server (typically CoreDNS) returns an A record containing the Service's ClusterIP address. This allows pods to reach the Service via its stable virtual IP.

Answer analysis

Option-by-option breakdown

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

  • PTR record

    Why it's wrong here

    PTR records are primarily used for reverse DNS lookups, which means mapping an IP address back to a hostname. When a client within Kubernetes attempts to resolve a service, it provides the service's hostname (e.g., `my-service.my-namespace.svc.cluster.local`) and expects an IP address in return. This is a forward DNS lookup, which is the opposite function of a PTR record. Therefore, PTR records are not the mechanism Kubernetes uses for the primary resolution of a service name to its ClusterIP.

  • SRV record

    Why it's wrong here

    While Kubernetes DNS (CoreDNS) does generate SRV records, they are primarily utilized for discovering specific named ports of a service or for resolving individual pod endpoints of a headless service. An SRV record provides the hostname and port number for a service, rather than just the IP address. For the fundamental task of mapping a standard ClusterIP service's fully qualified domain name (FQDN) directly to its stable ClusterIP, an SRV record is not the primary or direct mechanism employed.

  • CNAME record

    Why it's wrong here

    CNAME records are used to establish an alias, mapping one domain name to another canonical domain name. In Kubernetes, a service's fully qualified domain name (FQDN), such as `my-service.my-namespace.svc.cluster.local`, directly resolves to its ClusterIP without an intermediate alias. There is no need for an alias to another name that then resolves to the IP. While CNAMEs might be used in external DNS configurations, they are not the record type used internally by CoreDNS to resolve a service's name to its ClusterIP.

  • A record

    Why this is correct

    An A record, or Address record, is the fundamental DNS record type used to map a hostname directly to an IPv4 address. For a Kubernetes Service, CoreDNS creates an A record that maps the service's fully qualified domain name (e.g., `my-service.my-namespace.svc.cluster.local`) to its stable ClusterIP, which is an IPv4 address. This direct, one-to-one mapping is precisely what enables pods within the cluster to resolve service names to their corresponding network addresses for communication.

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 302-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.