Installing on Linux

Add New Nodes

After you use KubeSphere for a certain period of time, it is likely that you need to scale out your cluster with an increasing number of workloads. In this case, KubeSphere provides script to add new nodes to the cluster. Fundamentally, the operation is based on Kubelet’s registration mechanism. In other words, the new nodes will automatically join the existing Kubernetes cluster.


From v3.0.0, you can use the brand-new installer KubeKey to scale the master and worker node from a sing-node (all-in-one) cluster.

Step 1: Modify the Host Configuration

KubeSphere supports hybrid environments, which means the newly-added host OS can be CentOS or Ubuntu. When new machines are ready, add the configurations of the new machine under hosts and roleGroups of the file config-sample.yaml.


You are not allowed to modify the host name of existing nodes (e.g. master1) when adding new nodes.

For example, if you start with all-in-one installation, and you want to add new nodes to the single-node cluster, you can create a configuration file using KubeKey.

# Assume your original Kubernetes cluster is v1.17.9
./kk create config --with-kubesphere --with-kubernetes v1.17.9

The following section demonstrates how to add two nodes (i.e. node1 and node2) using root user as an example. It is assumed that your host name of the first machine is master1 (Replace the following host name with yours).

  - {name: master1, address:, internalAddress:, user: root, password: [email protected]123}
  - {name: node1, address:, internalAddress:, user: root, password: [email protected]123}
  - {name: node2, address:, internalAddress:, user: root, password: [email protected]123}
    - master1
    - master1
    - node1
    - node2

Step 2: Execute the Command to Add Nodes

Execute the following command to apply the changes:

./kk add nodes -f config-sample.yaml

Finally, you will be able to see the new nodes and their information in KubeSphere console after a successful return. Select Cluster Nodes under Nodes from the left menu, or use kubectl get node command to see the changes.

kubectl get node
NAME          STATUS   ROLES           AGE   VERSION
master1       Ready    master,worker   20d   v1.17.9
node1         Ready    worker          31h   v1.17.9
node2         Ready    worker          31h   v1.17.9