Removing nodes from an existing cluster
The remove node operation is supported only for shared storage.
It is not supported in the following cases:
-
When other nodes (excluding those targeted for removal) in the cluster are in the 'out of cluster' state.
-
During an upgrade.
-
In the FSS environment.Note: When performing this operation on OpenShift, replacekubectlwithocin the following procedure and run the commands on the bastion node instead of master node.
Complete the following steps to remove nodes from an existing InfoScale cluster:
-
Ensure that all the nodes (excluding the nodes that are being removed) must be in a Ready state. Run the following command on the master node to check whether the nodes are ready.
kubectl get nodes
-
Ensure that nodes not being removed are in a Joined state. Run the following command on the master node and then review the output.
kubectl describe <Name of the InfosScale Cluster> -n <Namespace>
For example, if worker-node-3 is planned for removal, verify that worker-node-1 and worker-node-2 are in the Joined state by checking their Role status:
Cluster Name: <Name of the InfosScale Cluster>
Cluster Nodes:
Node Name: worker-node-1
Role: Joined,Master
Node Name: worker-node-2
Role: Joined,Slave
Node Name: worker-node-3
Role: Joined,Slave
-
The InfoScale cluster must be in a running state. Run the following command on the master node to verify.
kubectl get infoscalecluster -n <Namespace>
See the State in the output similar to the following:
NAME VERSION CLUSTERID STATE DISKGROUPS STATUS AGE
<Name of 9.1.0 \<Cluster ID\> Running \<DG Name\> \<Status\> 3d13h
the InfoScale
Cluster>
-
Edit the
clusterInfosection of the sample/infoscale-yamls-v9.1.0/kubernetes/cr.yamlto remove information about the nodes that are planned for removal. -
Run the following command on the master node to initiate the remove node operation.
kubectl apply -f /infoscale-yamls-v9.1.0/kubernetes/cr.yaml
-
You can run the following command on the master node to check the InfoScale cluster state.
kubectl get infoscalecluster -n <Namespace>
See the state in the output as displayed below. ProcessingRemoveNode indicates the node is getting removed.
NAME VERSION CLUSTERID STATE DISKGROUPS STATUS AGE
<Name 9.1.0 <Cluster ID> ProcessingRemoveNode <DG Name> Healthy 3d13h
of the
InfosScale
Cluster>
-
Run the following command to verify if pods are being removed. It may take some time for the pods to get deleted.
kubectl get pods -n <Namespace> -o wide
-
Run the following command on the master node to verify if the cluster is 'Running' & 'Healthy'.
kubectl get infoscalecluster -n <Namespace>
Verify the output:
NAME VERSION CLUSTERID STATE DISKGROUPS STATUS AGE
<Name of the
InfoScale cluster> 9.1.0 \<Cluster ID\> Running \<DG Name\> Healthy 3d13h
Related information