This message was deleted.
# general
a
This message was deleted.
c
for controller deployments it doesn’t usually make sense to have more than 2, as they are leader-elected so only one is active at a time. Running more doesn’t get you anything.
Coredns is a bit different in that it actually provides a service to the cluster, and it may make sense to scale out the pods if you find yourself needing to do so to keep up with client DNS load.
the short answer is the same as it is to everything in Kubernetes - it depends.
a
is it safe to have 2 running? We previously had only 1, but this is on a three-node cluster, and during monthly maintenance windows bringing one instance down (for patching or replacing) resulted in issues
c
2 of what
they all do different things
a
2 pods of system deployments, in general? I suppose that's not the right question to ask...
c
yes its fine to have 2. It is recommended for HA. I wouldn’t go more than that for anything but coredns, and for coredns only if you find that you need to due to load.
as I said, controllers are leader elected so one of them will sit there doing nothing until the current leader goes away.
coredns is not a controller, it hosts a service (cluster dns) so you can actually see a benefit from scaling it out
a
that makes sense - are there docs anywhere for this btw?
we have a 6-node cluster (3 workers, 3 controllers) built in Packer and deployed via terraform rke, and the default number of Pods for system deployments is 1 in some cases:
so when we patch monthly (by rebuilding instances in Packer with the latest AMIs and redeploying them one at a time) we frequently encounter errors as nodes are cordoned and drained then replaced, and I suspect part of that is related to there only being 1 pod for some system deployments
(thanks very much for your help btw)
c
I am not aware of any docs that address scaling the individual components of both the cluster and rancher
you kind of have to know Kubernetes well enough to understand what role they each play, and why or when you would want to scale them.
a
sounds good - we'll change our default for these HA deployments to 2 since 1 seems problematic