Bird
0
0

What mechanism allows a Kubernetes Service to maintain a consistent IP address despite pod restarts?

easy📝 Conceptual Q1 of 15
Kubernetes - Services
What mechanism allows a Kubernetes Service to maintain a consistent IP address despite pod restarts?
AThe Service assigns a static IP that does not change
BThe Service uses a DNS name that resolves to pod IPs directly
CThe Service updates pod IPs manually in the cluster DNS
DThe Service provides a virtual IP that load balances to pods
Step-by-Step Solution
Solution:
  1. Step 1: Understand Service IP allocation

    Kubernetes Services allocate a stable virtual IP (ClusterIP) that does not change even if pods behind it restart or change.
  2. Step 2: Role of virtual IP

    This virtual IP acts as a stable endpoint and load balances traffic to the current set of pods matching the selector.
  3. Final Answer:

    The Service provides a virtual IP that load balances to pods -> Option D
  4. Quick Check:

    Stable IP is virtual, not static pod IP [OK]
Quick Trick: Services use virtual IPs for stable networking [OK]
Common Mistakes:
  • Confusing pod IPs with Service IPs
  • Assuming DNS resolves directly to pod IPs
  • Thinking Service IP changes with pods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes