Can anyone explain why there is a requirement for leader election when having an ingress-controller (nginx) deployment with multiple replica's? Is there a sync going on between them? What is actually synced?
I searched the documentation and found ... nothing I know there is a configmap that holds the POD name of the leader but that's pretty much it.
I also see that a leader election is going on when starting the pod
I0828 16:08:39.500651 7 nginx.go:307] Starting NGINX process
I0828 16:08:39.500779 7 leaderelection.go:242] attempting to acquire leader lease ingresscontroller/ingress-controller-leader...
I0828 16:08:39.500890 7 nginx.go:327] Starting validation webhook on :8443 with keys /usr/local/certificates/cert /usr/local/certificates/key
I0828 16:08:39.503049 7 controller.go:141] Configuration changes detected, backend reload required.
I0828 16:08:39.504322 7 status.go:86] new leader elected: ingress-nginx-controller-xxxxxx-xxxx
I0828 16:08:39.728368 7 controller.go:157] Backend successfully reloaded.
I0828 16:08:39.728416 7 controller.go:166] Initial sync, sleeping for 1 second.
Can anyone provide some insights on why there is a requirement for a leader?
Thanks in advance!
Bregt