我要评分
获取效率
正确性
完整性
易理解

Adding a Worker Node

After using KubeSphere for a while, you may need to scale out the cluster due to the increasing workload. To add a new worker node, perform the following operations on the master node. The operation of adding worker nodes is based on the Kubelet registration mechanism. That is, the added new nodes are automatically added to the existing Kubernetes cluster.

  1. Configure the deployment environment on a new node. For details, see Configuring the Installation Environment.
  2. Install dependencies on the new node.
    yum install -y curl socat conntrack openssl ipset ipvsadm
  3. Search for cluster information and create a configuration file.
    ./kk create config --from-cluster
    • The default name of the generated configuration file is sample.yaml. Skip this step if a configuration file (for example, config-sample.yaml) already exists on your node.
    • You need to add the information about the new node to the cluster configuration file. You need to set some parameters personally. Enter information about all nodes (including new nodes) under sections hosts and roleGroups. For details, see the example in 5. Note that you need to modify SHOULD_BE_REPLACED in the configuration file based on actual requirements.
  4. Run the following command to apply the preceding configurations:
    ./kk add nodes -f sample.yaml

    After the preceding command is executed, KubeKey checks the installation environment. The check result is displayed in a table and the prompt information "Continue this installation? [yes/no]:" is displayed. Check whether all dependency requirements are met, type yes, and press Enter.

    If execute successfully is returned, the node is successfully added.