KCNA Container Orchestration Practice Question
Which TWO of the following are true about service discovery in Kubernetes? (Choose 2)
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
✓
Environment variables are injected into pods for each Service
Kubernetes provides DNS-based service discovery, where Services get DNS names resolved by CoreDNS. Services also have environment variables injected into pods. Headless Services do not provide a single IP; they return the pod IPs. Ingress is for external traffic, not internal service discovery.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Ingress resources can be used for internal service discovery
Why it's wrong here
Ingress is for external HTTP/HTTPS traffic routing to Services.
- ✗
Service discovery is only available for pods on the same node
Why it's wrong here
Service discovery works across all nodes in the cluster.
- ✓
Environment variables are injected into pods for each Service
Why this is correct
When a pod starts, environment variables are set for each active Service.
- ✓
Services are assigned a DNS name in the form <service>.<namespace>.svc.cluster.local
Why this is correct
Kubernetes DNS resolves Service names to cluster IPs.
- ✗
Headless Services provide a stable virtual IP for service discovery
Why it's wrong here
Headless Services do not have a cluster IP; they return the IPs of the endpoints.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 833 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.