How do I remove an NSP cluster node?

Purpose

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

Note: You can use the procedure to remove only a node added using procedure How do I add an NSP cluster node?.

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 cluster host.


Open a console window.


Enter the following:

kubectl get nodes ↵

The NSP cluster nodes are listed.


Record the name of the node that you intend to remove.


Enter the following to stop all pods that are running on the node:

# kubectl drain node --ignore-daemonsets --delete-local-data ↵

where node is the name of the node that you intend to remove


Enter the following:

kubectl delete node name

where name is the name of the node to remove

The node is removed from the cluster.


Enter the following:

kubectl get nodes ↵

The NSP cluster nodes are listed.


Verify that the node is removed from the cluster.


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


10 

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

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


11 

Remove all references to the removed node to ensure that the node cannot be added back into the cluster during a redeployment operation.


12 

Save and close the file.


13 

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, preferably in a remote facility.


14 

Enter the following:

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


15 

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


16 

Perform How do I back up the NSP cluster databases? to ensure that the reconfigured cluster can be restored in the event of a failure.


17 

Close the console window.

End of steps