Cluster Expansion
Use this procedure to add nodes to a NineData dedicated cluster.
Before you begin
- You have completed single-node or high-availability deployment by following the Installation and Deployment documentation.
- You have SSH access to the NineData cluster server.
- You have prepared the machine to be expanded, and the machine specifications are the same as those of the NineData cluster that has been installed.
Procedure
On the master node server where the NineData dedicated cluster service has been installed, enter the NineData container's command line by executing the
docker exec -it ninedata niupcommand.Execute the
cluster server_cmdcommand to obtain the installation command for the new node.The result of obtaining the command is as follows:
# ====================== Instructions ======================
# Please replace LOCAL_NODE_IP with the local machine IP, which can be obtained through the following command:
# hostname -I | awk '{print $1}'
# Please replace DATA_DIR with the actual data path
# Please replace ETCD_DATA_DIR with the actual ETCD data path
# ======================================================
sh install.sh --data-dir=<DATA_DIR> --etcd-data-dir=<ETCD_DATA_DIR> --params="-e SERVER_HOST=https://<LOCAL_NODE_IP>:6443 -e TOKEN=xxxxxxx"Copy the installation package to the new node server.
scp ninedata_x.x.x.tar.gz <SSH_USERNAME>@<NEW_NODE_IP_ADDRESS>:<NEW_NODE_DIRECTORY_PATH>In the
--paramsparameter obtained in step 2, add the-e ROLE=Agentvariable. Example is as follows:sh install.sh --data-dir=<DATA_DIR> --etcd-data-dir=<ETCD_DATA_DIR> --params="-e ROLE=Agent -e SERVER_HOST=https://<LOCAL_NODE_IP>:6443 -e TOKEN=xxxxxxx"Connect to the master node server and run the
docker exec -it ninedata kubectl get nodescommand to confirm the result.server-73kf8 Ready control-plane,master 1m v1.32.4+k3s1
server-pb4uc Ready control-plane,master 5m v1.32.4+k3s1
server-n99iw Ready control-plane,master 13m v1.32.4+k3s1
agent-n99iw Ready 13m v1.32.4+k3s1The appearance of node information starting with agent indicates that the expansion node is successful.