🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Unique ID Generator: all 15 questions

Quiz: Unique ID Generator · Question 15 of 15

In Kubernetes, what is a common trick to give each ID generator a unique machine id?

In Kubernetes, what is a common trick to give each ID generator a unique machine id?

  1. A.Use the pod's random name hash
  2. B.Use the StatefulSet pod ordinal, such as gen-0, gen-1
  3. C.Use the current time
  4. D.Let every pod use machine id 0
Answer & explanation

Correct answer: Use the StatefulSet pod ordinal, such as gen-0, gen-1

StatefulSet ordinals are stable and unique within the set.

Can you get the rest right without peeking?

Take the timed Quiz: Unique ID Generator quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →