How do I add an NSP cluster node?

Purpose

Perform this procedure to create a new worker node in an NSP cluster. The new node can run pods that do not require local storage, such as pods that are not pinned to a specific node.

Note: The procedure does not describe the addition of master nodes. To add master nodes, for example, by changing from a standard to an enhanced deployment, see “To enlarge an NSP deployment” in the NSP Installation and Upgrade Guide.

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 or NSP admin 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


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

Enter the following:

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

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

An SSH key is generated.


10 

Enter the following for each NSP cluster VM to distribute the key to the VM.

ssh-copy-id -i key_file user@address

where

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

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

address is the IP address of the new VM


11 

Log in as the root user on the new VM.


12 

Open a console window.


13 

Enter the following:

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


14 

Enter the following:

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


15 

Close the VM console window.


16 

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.


17 

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


18 

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:


19 

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


20 

Close the open console windows.

End of steps