Courseiva
Services and Networking →mediumMultiple Choice

CKA Services and Networking Practice Question

Which of the following is the default DNS name for a Service named 'my-svc' in namespace 'my-ns'?

⚠ Common exam trap

The trap here is that candidates often forget the `svc` subdomain or the `cluster.local` suffix, confusing the Service DNS pattern with the Pod DNS pattern or assuming a shorter name will work due to search domain expansion.

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

A is correct because Kubernetes uses a built-in DNS system (CoreDNS) that automatically creates DNS records for Services. The fully qualified domain name (FQDN) for a Service follows the pattern `<service-name>.<namespace>.svc.cluster.local`, where `svc` is a fixed label indicating it's a Service record, and `cluster.local` is the default cluster domain. This allows pods to resolve the Service by name within the cluster.

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

    Why this is correct

    This represents the fully qualified domain name (FQDN) for a Kubernetes Service. It strictly adheres to the standard format `<service-name>.<namespace>.svc.<cluster-domain>`, where the `svc` segment explicitly identifies the resource type as a service and `cluster.local` represents the default cluster-wide domain suffix.

  • ✗

    my-svc.my-ns.cluster.local

    Why it's wrong here

    This domain name is invalid because it completely omits the mandatory `svc` subdomain segment. Kubernetes CoreDNS relies on this specific resource type identifier within the query path to differentiate service records from other cluster resources like pods or endpoints.

  • ✗

    my-svc.my-ns.svc

    Why it's wrong here

    While this relative name can be resolved from within the same cluster due to search paths configured in `/etc/resolv.conf`, it is incomplete and does not represent the absolute, fully qualified default DNS name because it omits the trailing cluster domain suffix.

  • ✗

    my-svc.my-ns.pod.cluster.local

    Why it's wrong here

    This format incorrectly substitutes the `svc` resource identifier with the `pod` subdomain. In the Kubernetes DNS specification, the `pod` segment is reserved exclusively for resolving individual Pod IP addresses, which are formatted by replacing the IP octet periods with dashes.

Visual reference

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

Go deeper

Related to this question

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.