k0sproject / k0sctl

A bootstrapping and management tool for k0s clusters.
Other
390 stars 77 forks source link

Question: Is it possible to add additional control plane nodes after initializing the k0s cluster? #721

Open vyas-n opened 5 months ago

vyas-n commented 5 months ago

Hey Folks,

I currently have a k0s cluster deployed using k0sctl with the following topology:

And I wondered if it's possible to add the following nodes to make the control plane HA:

I've previously added worker nodes this way no problem, I just don't know if control plane nodes can be joined the same way.

Is this possible using k0sctl?

kke commented 5 months ago

It should be, but there is a bug that may prevent doing so in some conditions which will be fixed by #714

twz123 commented 5 months ago

NB: If you're going from single-node control plane to HA control plane, you need to have some sort of load balancing in place, then, and a restart of all workers (including the controller+worker) node is required to pick that up (in case of NLLB). In case of using spec.api.externalAddress, it might even be necessary to rejoin the workers, or manually adjust the k0s worker's kubeconfig files, to point to the new address.

kke commented 5 months ago

Hmm, maybe some of those could/should be automated or at least detected in k0sctl?