Skip to main content

Introducing additional nodes to the cluster

In a cluster, pods share the resources available across the nodes. In case the available resources are not enough for the application to run smoothly, you may want to introduce additional nodes to the cluster. Before you add a node to the existing cluster, you need to ensure that:

WarningThis document is not applicable for single-node deployment.
  • The node to be added must have the same configuration as that of the other existing nodes.
  • The RKE2 server is running.
  • You have set up the new node. You need to meet this prerequisite only when you have Red Hat OS installed on the node.

Steps for setting up the new node​

Follow the steps given below to set up the node before you add it to the cluster.

  1. Disable and stop the firewall by running the following set of commands in the same order:

Code

sudo systemctl disable firewalld

sudo systemctl stop firewalld
  1. Disable and stop the nm-cloud-setup.timer network manager service by running the following set of commands in the same order:

Code

sudo systemctl disable nm-cloud-setup.timer

sudo systemctl stop nm-cloud-setup.timer
  1. Disable and stop the nm-cloud-setup.service network manager service by running the following set of commands in the same order:

Code

sudo systemctl disable nm-cloud-setup.service

sudo systemctl stop nm-cloud-setup.service
  1. Run the following set of commands in the same order to install the nfs-utils, iptables, and open-iscsipackages:

Code

sudo yum install nfs-utils

sudo yum install iptables-services
sudo yum --setopt=tsflags=noscripts install iscsi-initiator-utils
  1. Start and then stop the iptables service by running the following set of commands in the same order.

Code

sudo systemctl start iptables

sudo systemctl stop iptables
  1. Run the following set of commands in the same order to enable and start the open-iscsi service.

Code

sudo systemctl enable iscsid

sudo systemctl start iscsid

Steps for adding the new node​

Following are the steps to add the node.

  1. Open the inventory-cluster.ini file from the inventory folder.

  2. In the inventory file, add the domain name or IP address of the server node or worker node you want to introduce as illustrated in the following screenshot.

    Success
    • If you want to add a server (master) node, enter the node’s IP address or domain name under the [servers] group in the inventory file.
    • If you want to add a worker node, enter the node’s IP address or domain name under the [agents] group in the inventory file.

  1. Run the following command.

Code

$ sudo ./adeptia-rancher.sh --tag=add-nodes

Verify the new node​

Follow the steps given below to verify if the node has been added to the cluster.

  1. Log in to the Rancher UI.

  2. Click the burger menu at the top-left corner, and then click local.

  3. In the left panel, expand Cluster, and then click Nodes.

  4. Check if the node you have added is listed under Nodes by verifying the following:

    1. The domain name or IP address of the added node is visible under the Name column.

    2. The role (under the Roles column) for the added node is set to Control Plane, Etcd or Agent, Etcd based on the type of node.

      1. If you have added a server node, the role must be set to Control Plane, Etcd.
      2. If you have added a worker node, the role must be set to Agent, Etcd.
    3. The version of the added node is the same as that of the other existing nodes.

  5. Check if the status of the added node is Active (under the State column).

Once the node has been added, in addition to the resources of the existing nodes, the resources of this newly added node also become available to be used by the pods.