https://dev.to/sklarsa/how-to-add-kubernetes-powered-leader-election-to-your-go-apps-57jh
這主題滿少見的,探討如何用 k8s 內建的 lease 物件來幫你的應用程式撰寫簡易的 election 機制。
如果你是用 kubeadm 安裝的環境且走 HA 架構,內建的 controller/scheduler 裡面其實也是靠這些來完成相關選舉的

DEV Community
How to add Kubernetes-powered leader election to your Go apps
Learn about leader election and how you can leverage part of the Kubernetes standard library to add this feature to your next application
January 20, 2025 874 2