Courseiva
Services and NetworkinghardMultiple ChoiceObjective-mapped

CKAD Services and Networking Practice Question

You have a Service that exposes a Deployment. Some pods are not receiving traffic. 'kubectl get endpoints my-service' shows only 2 out of 3 pod IPs. What is the most likely cause?

⚠ Common exam trap

Many candidates confuse readiness probes with liveness probes or assume that any pod with matching labels will automatically receive traffic, ignoring the critical role of the Ready condition in endpoint selection.

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

One pod is not ready (readiness probe failing)

The most likely cause is that one pod is not ready because its readiness probe is failing. Services only forward traffic to pods that are in the Ready state, as reflected in the Endpoints object. If a pod fails its readiness probe, it is removed from the list of endpoints, even if it is running and has the correct labels.

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 Deployment has a wrong targetPort

    Why it's wrong here

    The Service's targetPort determines which container port receives traffic, but it does not affect which pods are selected as endpoints. Even if targetPort references a non-existent or incorrect port, every pod matching the selector and in a Ready state will still appear in the endpoints list, just with the port specified by targetPort. Thus a misconfigured targetPort could cause connection failures, but it cannot explain why only some pods are missing from the endpoints list.

  • The Service type is NodePort

    Why it's wrong here

    The Service type (ClusterIP, NodePort, or LoadBalancer) only controls how the Service is exposed externally; it has no bearing on the endpoints that back the Service. The EndpointController populates endpoints identically regardless of type, as long as the selector matches and the pods are Ready. Setting the type to NodePort would not remove or omit any pods from the endpoints list, so it cannot be the reason some pods are absent.

  • One pod has a different label than the Service selector

    Why it's wrong here

    If one pod has a label that does not match the Service selector, that pod would indeed be excluded from the endpoints list entirely, because the selector defines the set of pods the Service can target. However, in this scenario the Service is still showing some pods as endpoints, meaning the selector is generally correct and matching most pods. A single mislabeled pod would affect that specific pod only, not a subset of otherwise healthy, correctly labeled pods; the fact that some pods are not ready suggests the real cause is readiness, not label inconsistency.

  • One pod is not ready (readiness probe failing)

    Why this is correct

    Only pods that are both matching the Service selector and in a Ready state are included as endpoints. A pod can be Running and have passed startup liveness checks, but if its readiness probe is failing, Kubernetes sets the pod's Ready condition to False, and the EndpointController immediately removes it from all Services it backs. This is why some pods appear while others—those with failing readiness probes—are missing from the endpoints list, even though they are part of the Deployment.

About these practice questions

This CKAD question is part of Courseiva's 160-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 CKAD 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 CKAD exam.