How do I add an NSP cluster node?

Purpose

The following steps describe how to add a node to an NSP cluster.

The procedure creates a new worker node in the cluster that can run pods that do not require local storage, such as pods that are not pinned to a specific node.

Note: If root access for remote operations is disabled in the NSP configuration, remote operations such as SSH and SCP as the root user are not permitted within an NSP cluster. Steps that describe such an operation as the root user must be performed as the designated non-root user with sudoer privileges.

For simplicity, such steps describe only root-user access.

Steps
CAUTION 

CAUTION

System Degradation

The procedure includes operations that fundamentally reconfigure the NSP system.

You must contact Nokia support for guidance before you attempt to perform the procedure.

 

Log in as the root user on the NSP deployer host.


Open a console window.


Open the following file using a plain-text editor such as vi:

/opt/nsp/nsp-k8s-deployer-release-ID/config/k8s-deployer.yml


Add the new node to the hosts section, as shown below; see the descriptive text at the head of the file for parameter information.

nodeName: node5

nodeIp: 192.168.98.196

accessIp: 203.0.113.5


Save and close the file.


Create a backup copy of the updated k8s-deployer.yml file, and transfer the backup copy to a station that is separate from the NSP system and preferably in a remote facility.

Note: The backup file is crucial in the event of an NSP deployer host failure, so must be available from a separate station.


Enter the following:

cd /opt/nsp/nsp-k8s-deployer-release-ID/bin ↵


Enter the following to create the cluster configuration:

./nspk8sctl config -c ↵

The following is displayed when the creation is complete:

✔ Cluster hosts configuration is created at: /opt/nsp/nsp-k8s-deployer-release-ID/config/hosts.yml


Generate an SSH key for password-free NSP deployer host access to the new NSP cluster VM.

  1. If remote root access is disabled, switch to the designated root-equivalent user.

  2. Enter the following:

    ssh-keygen -N "" -f path -t rsa ↵

    where path is the SSH key path, for example, /home/user/.ssh/id_rsa

  3. Enter the following to distribute the key to the new VM.

    ssh-copy-id -i key_file user@address

    where

    key_file is the SSH key file, for example, /home/user/.ssh/id_rsa.pub

    address is the IP address of the new VM

    user is the designated NSP ansible user, if root-user access is restricted; otherwise, user@ is not required

    The SSH key is transferred to the new node.

  4. If remote root access is disabled, switch back to the root user.


10 

Log in as the root user on the new VM.


11 

Open a console window.


12 

Enter the following:

mkdir -p /opt/nsp/volumes/fluentd-posfiles ↵


13 

Enter the following:

chown -R 1000:1000 /opt/nsp/volumes ↵


14 

Close the VM console window.


15 

Enter the following on the NSP deployer host:

Note: If the NSP cluster VMs do not have the required SSH key, you must include the --ask-pass argument in the command, as shown in the following example, and are subsequently prompted for the root password of each cluster member:

nspk8sctl --ask-pass install

./nspk8sctl install ↵

The updated NSP cluster is deployed.


16 

Log in as the root user on the NSP cluster host.


17 

Enter the following to verify that the new node is added to the cluster:

kubectl get nodes ↵

An action such as the following causes pod deployment on the new node:


18 

Back up the NSP cluster data, as described in How do I back up the NSP cluster databases?


19 

Close the open console windows.

End of steps