In a multi-master kubernetes cluster, do only one master schedule and are the other masters in a standby mode?

10/21/2020

In a multi-master kubernetes cluster, do only one master schedule and are the other masters in a standby mode? Does all the masters coordinate and schedule pods and etc?

-- jarge
kubernetes

1 Answer

10/21/2020

That's mostly correct; one can see that process by looking at the logs of all the controller-manager Pods and observing:

I1021 00:09:49.283273 1 leaderelection.go:243] attempting to acquire leader lease kube-system/kube-controller-manager...

in some of them, and more "working" messages in just one of them:

I1021 02:12:51.779698 1 cleaner.go:181] Cleaning CSR "csr-rf8vh" as it is more than 1h0m0s old and approved.

I say "mostly correct" because to the best of my knowledge all apiserver Pods are actively doing work -- or at the very least they service HTTPS traffic and emit Audit logs -- but the rest of the HA components use that leader lease pattern

As for your 2nd question

Does all the masters coordinate and schedule pods and etc?

no, that's the job of the scheduler Pods, which, again, use that leader lease pattern in order to avoid competing scheduling decisions

-- mdaniel
Source: StackOverflow