CKA Troubleshooting Practice Question
You are troubleshooting a service named 'api' in the 'prod' namespace that is not reachable from other pods. You run 'kubectl get endpoints api -n prod' and see that the endpoints list is empty. The service selector is 'app=api', and there are three pods with that label running. Which of the following is the MOST likely cause?
⚠ Common exam trap
The trap here is focusing on port mismatches or selector typos, when the most frequent cause of empty endpoints for a service with matching pods is failing readiness probes.
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 pods are not passing their readiness probes, so they are excluded from the service endpoints.
A service's endpoints are populated only with the IP addresses of pods that match the selector and are in the Ready state. If the readiness probe fails, the pod is not considered ready, and the endpoint is not created. This is a common cause of empty endpoints. Checking pod readiness and probe configurations is essential. Other factors like namespace mismatch or port issues would not typically result in an empty endpoints list when pods are running.
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 pods are not passing their readiness probes, so they are excluded from the service endpoints.
Why this is correct
Kubernetes only includes pods in a service's endpoints if they are in the Ready state. If the readiness probe fails, the pod is not considered ready, and its IP is not added to the endpoints. Even if the pods are running and have the correct label, they will not receive traffic. Checking the pod status with 'kubectl get pods -n prod -l app=api' and describing them to see readiness probe failures is the next step.
- ✗
The service's targetPort does not match the containerPort, causing the endpoints controller to ignore the pods.
Why it's wrong here
The targetPort mismatch would affect traffic forwarding to the pod, but it would not cause the endpoints list to be empty. The endpoints controller adds pod IPs based on label selectors and readiness, regardless of the port configuration. A targetPort mismatch would result in connection errors when accessing the service, but the endpoints would still list the pod IPs and ports.
- ✗
The pods are not in the same namespace as the service.
Why it's wrong here
If the pods were in a different namespace, they would not match the service selector because services only select pods within their own namespace. However, you stated there are three pods with the label 'app=api' running, and you are checking the service in 'prod'. It is possible the pods are in a different namespace, but the question implies they are in the same namespace. The more likely cause is that the pods are not ready, which is a common reason for empty endpoints.
- ✗
The service is of type ExternalName, which does not use selectors or endpoints.
Why it's wrong here
An ExternalName service does not have selectors or endpoints; it simply returns a CNAME record. However, the question states the service has a selector 'app=api', which is not applicable to ExternalName services. So this is not the case. The empty endpoints with a selector present strongly point to pod readiness issues.
Go deeper
Related to this question
About these practice questions
One of 726 original CKA 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CNCF exam blueprint
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.