Interview practice question
Leader election in Kubernetes
System Design · Distributed Systems · Intermediate
You have a controller running as 3 replicas in Kubernetes, and only one should act at a time. How would you implement it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Kubernetes Lease objects.
- client-go leaderelection library.
- Lease duration and renew deadline.
- Non-leaders stand by.
- Handle loss of leadership by stopping work.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.