Courseiva
Container Orchestration →mediumMultiple Choice

KCNA Container Orchestration Practice Question

You have a microservices application deployed as a set of Pods in a Kubernetes cluster. You need to ensure that Pods can discover each other using stable DNS names. Which Kubernetes resource should you create?

⚠ Common exam trap

CNCF often tests the misconception that a Deployment itself provides stable DNS names, but Deployments only manage Pod replicas; the Service resource is required to expose a stable network endpoint and 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

✓

Service

A Service of type ClusterIP (the default) provides a stable virtual IP and DNS name (e.g., my-service.namespace.svc.cluster.local) that resolves to the Pods selected by its label selector. This allows Pods to discover each other using consistent DNS names, regardless of Pod IP changes due to scaling or restarts. The kube-dns or CoreDNS addon automatically creates DNS records for Services, enabling service discovery 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.

  • ✗

    ConfigMap

    Why it's wrong here

    A ConfigMap injects non-confidential configuration data as environment variables or mounted files; it holds no network identity or DNS record. It is tempting because it decouples configuration from images, and would be correct when Pods need externalised settings such as feature flags or endpoint URLs.

  • ✗

    Ingress

    Why it's wrong here

    Ingress exposes HTTP and HTTPS routes from outside the cluster to Services, providing no stable internal DNS name for Pod-to-Pod discovery. It is tempting because it is the standard resource for reaching workloads, and would be correct when external clients must access a service at a published hostname.

  • ✓

    Service

    Why this is correct

    A Service assigns a stable virtual IP and DNS name to a set of Pods, load-balancing across them. Pod IPs change as Pods restart, so the Service abstraction is what provides the stable discovery name required.

  • ✗

    Deployment

    Why it's wrong here

    A Deployment manages ReplicaSet rollout and scaling of stateless Pods; it creates no stable network identity, and Pod IPs change on recreation. It is tempting because Deployments are the usual way to run microservices, and would be correct when the requirement is declarative rolling updates rather than discovery.

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 KCNA question from scratch — 930 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 KCNA 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 KCNA exam.