Bird
0
0

If a StatefulSet named db has 4 replicas, what will be the pod name of the last pod created?

medium📝 Command Output Q5 of 15
Kubernetes - Persistent Storage
If a StatefulSet named db has 4 replicas, what will be the pod name of the last pod created?
Adb-1
Bdb-3
Cdb-0
Ddb-4
Step-by-Step Solution
Solution:
  1. Step 1: Understand pod naming and indexing

    Pods are named with the StatefulSet name plus an ordinal index starting at 0.
  2. Step 2: Identify last pod ordinal for 4 replicas

    With 4 replicas, pods are db-0, db-1, db-2, db-3. The last pod created is db-3.
  3. Final Answer:

    db-3 -> Option B
  4. Quick Check:

    Last pod name = db-3 [OK]
Quick Trick: Last pod ordinal is replicas minus one [OK]
Common Mistakes:
  • Using replica count as ordinal
  • Starting ordinal at 1
  • Confusing pod name with StatefulSet name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes