A user creates a Service of type ClusterIP with a selector matching pods labeled 'app: myapp'. However, a pod named 'myapp-pod' with label 'app: myapp' is not receiving traffic. What is a possible reason?
A failing readiness probe marks the pod NotReady, so the Endpoints controller excludes its IP from the Service's endpoint list. The selector matches correctly, but ClusterIP only forwards to ready endpoints, so traffic never reaches the pod.
Why this answer
A failing readiness probe causes the pod to be removed from the Service's Endpoints list, even if the pod is running and matches the selector. The kubelet checks the readiness probe periodically; if it fails, the pod is marked as not ready, and the Service controller removes its IP from the Endpoints object, preventing traffic from being forwarded to it.
Exam trap
The CNCF-KCNA exam often tests the distinction between liveness and readiness probes; the trap here is that candidates assume a running pod automatically receives traffic, overlooking that readiness probes explicitly gate traffic admission.
How to eliminate wrong answers
Option A is wrong because changing the Service type to NodePort would expose the Service externally but does not affect internal traffic routing to a pod that is not receiving traffic due to readiness issues; the core problem is pod readiness, not Service type. Option B is wrong because a Service only selects pods within its own namespace; if the pod were in a different namespace, it would not match the selector at all, and the question states the pod has the matching label, implying it is in the same namespace. Option D is wrong because while defining a container port is a best practice, it is not required for traffic to reach the pod; the Service can forward traffic to any port the pod listens on, and the absence of a container port definition does not prevent the pod from receiving traffic if the port is known.