DEV Community

loading...
Cover image for Rancher 101 - Adding and Removing Nodes

Rancher 101 - Adding and Removing Nodes

mrofisr profile image Muhammad Abdur Rofi ・1 min read

Adding and Removing Nodes

Earlier in this module we talked about how RKE can adapt a cluster on the fly. You'll see this later in the Rancher restore process where we'll build a single-node cluster off of the restored data, then add two more nodes to it. When it's all done, it's a three-node cluster and highly available.

You can do the same with worker and control plane nodes. An HA cluster has two control plane nodes, three etcd nodes, and as many workers as necessary. You can combine etcd and control plane nodes if you want, or you can separate them out. You can even start with them combined, then break them out later.

All of these changes happen in cluster.yml by changing the role of a node. You can add new nodes and designate their role. You can remove a role from a node, and RKE will deprovision those components from that node.

One thing that we recommend is that you only make one change at a time.

For example, imagine that you have control plane functionality on node A and node B, and you want to move it from node B to node C. The safest way to do this is to add node C as a control plane node, and after the cluster settles, remove the control plane role from node B. This makes sure that your cluster is always highly available.

References

Discussion (0)

pic
Editor guide