Leader election using Kubernetes leases
divergentdave opened this issue · comments
David Cook commented
Kubernetes Lease
resources could be used as an alternative backend for leader election. This could simplify deployments on Kubernetes (such as in examples/deployments/kubernetes
) by eliminating the need for a second etcd cluster running as a Kubernetes workload.
Roger Ng commented
The leader election example from k8s.io looks easy to implement.
https://pkg.go.dev/k8s.io/client-go/examples/leader-election
Unfortunately the Kubernetes deployment examples in this repo are outdated. It would be hard to test the end-to-end deployment for the leader election change without modernising the k8s deployment.