Bird
0
0

Why does Kubernetes service routing rely on labels instead of pod IP addresses?

hard📝 Conceptual Q10 of 15
Kubernetes - Labels and Selectors
Why does Kubernetes service routing rely on labels instead of pod IP addresses?
ABecause services cannot access pod IPs
BBecause IP addresses are not unique in Kubernetes
CBecause labels are faster to query than IPs
DBecause pods are ephemeral and IPs can change, labels provide stable grouping
Step-by-Step Solution
Solution:
  1. Step 1: Understand pod lifecycle

    Pods can be created and destroyed frequently, changing their IP addresses.
  2. Step 2: Role of labels in stable routing

    Labels provide a stable way to group pods logically despite IP changes.
  3. Final Answer:

    Because pods are ephemeral and IPs can change, labels provide stable grouping -> Option D
  4. Quick Check:

    Labels provide stable grouping despite pod IP changes = A [OK]
Quick Trick: Labels group pods stably despite changing IPs [OK]
Common Mistakes:
  • Thinking IPs are stable identifiers
  • Assuming labels are faster than IPs
  • Believing services cannot access pod IPs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes