https://rancher.com/ logo
Title
m

miniature-magician-78452

02/07/2023, 10:28 PM
This seems like it should be an easy question but I'm having trouble finding the answer: I have a home lab cluster (1 srv, 2 additional agents) configured with alternative tls-san and CNAME record in my DNS means my registration address is always
<http://cluster.domain.net|cluster.domain.net>
, regardless of the server node. I like to "cycle" nodes on a regular cadence (say every 2 weeks) to keep nodes up to date. So, if I provision a new server and new agents using the fixed registration (
<http://cluster.domain.net|cluster.domain.net>
), can I just uninstall rke2 from the old nodes and then deprovision them? I would presume i should cordon and drain each node prior to rke2 uninstall, but if I'm provisioning a new server node pointing to the registration address, can I just change the CNAME to point to the new server and then cordon, drain, and uninstall the old server??
c

creamy-pencil-82913

02/07/2023, 10:29 PM
if you only have one server, I’m confused as to what will be left to point the new nodes at after you’ve deleted everything. Or are you asking about just the agents?
I wouldn’t do rolling replacement of servers with less than 3. Even then you could find yourself in a tenuous situation with regards to quorum, as it requires an odd number of nodes. Quorum requires 2 servers be online when you have 2/3/4 servers in the cluster.
if you are completely throwing everything away though, and maintaining state doesn’t matter, you should be fine though. I wouldn’t even bother draining in that case because who cares.
m

miniature-magician-78452

02/07/2023, 11:43 PM
Some background: In previous RKE1 clusters, I tended to do rolling replacements. but I also have those clusters provisioned as follows: 1 node with the control plane/etcd/worker roles 2 nodes with etcd/worker roles Any additional nodes are just workers I'm wondering if, for RKE2, I should just provision 3 servers always (where they would have workloads as well) and then rolling replacements would be "add one, delete one" as desired. I understand the quorum aspect, but wasn't sure how rolling replacements would work. Sounds like i might be safer with "always 3 servers" and add agents for additional capacity as needed.
Again, this is home lab, not production quality: production deployments i would certainly provision a 3 node server group for JUST management and then additional agents for workloads.
For clarity, i always have 3 nodes in any one cluster... I am trying to get a handle on "rke2 server/agent" versus "rke1 controlplane/etcd/worker"
c

creamy-pencil-82913

02/08/2023, 12:08 AM
in rke2, everything is a also a “worker” unless you go out of your way to taint the server nodes
I would probably just run 3 servers, and don’t taint them. If you want to do rolling replacements, I would probably add the new node, first, and then remove the old one. You’ll always have a quorum of at least 2, but the total node count will temporarily burst up to 4.
👍 1
m

miniature-magician-78452

02/08/2023, 12:19 AM
@creamy-pencil-82913 Thanks for the clarification. I'll re-work my automated provisioning to reflect the first three nodes being servers, and anything after that just plain agents, and allow for rolling replacements. I appreciate the insight!