• Cloud-Native Container ProductsCloud-Native Container Products
    • KubeSphere Enterprisehot
    • KubeSphere Virtualizationhot
    • KubeSphere Enterprise HCI
  • Cloud-Native ServiceCloud-Native Service
    • KubeSphere Backuphot
    • KubeSphere Litenew
    • KubeSphere Inspectornew
  • Public Cloud Container ServicePublic Cloud Container Service
    • KubeSphere on AWS
    • KubeSphere on DigitalOcean

Add nodes

Describes how to add nodes to a KSV cluster.

This topic describes how to add nodes to a KubeSphere Virtualization (KSV) cluster.

KSV allows you to add nodes only. You cannot delete nodes from a KSV cluster. KSV supports the following methods to add nodes:

Prerequisites

Make sure the number of nodes you want to add does not exceed the resource quota of your KSV cluster. In single-node mode, KSV allows you to add another two nodes. If you want to add more nodes, we recommend that you purchase the Developer or Enterprise Edition. For more information about editions and resource quotas, see Editions.

Use the KSV web console to add nodes

  1. Log in to the KSV web console as user admin.

  2. In the top navigation bar, click Physical Resources to go to the management page of physical resources.

  3. In the left-side navigation pane, choose Nodes > Physical Nodes.

  4. In the upper-right corner of the Physical Nodes page, click Add to open the wizard to add a node.

  5. In the dialog box that appears, configure the following parameters for the node that you want to add.

    ParameterDescription
    Name
    The custom name of the node.
    The name can contain only lowercase letters, digits, and hyphens (-), and must start and end with a lowercase letter or a digit. The name can contain up to 16 characters in length.
    SSH Login
    The SSH login method of the node. KSV provides the following methods to add a node:
    • Username and Password: Log in to the server node using a username and its password.
    • SSH Key: Log in to the server node using an SSH key.
    Username
    The username used for SSH login. This parameter is available only when SSH Login is set to Username and Password. By default, user root is used to log in to the server node.
    Password
    The password used for SSH login. This parameter is available only when SSH Login is set to Username and Password.
    Internal IP Address
    The internal IP address of the node. This IP address is accessible to all nodes in the cluster.
    To specify multiple internal IP addresses, click Add.
  6. Click Add. The node appears in the node list after it is added.

    common:NOTE

    To view the progress of adding nodes, place the cursor in the lower-right corner of the page to open the toolbox and choose Upload Progress > Nodes.

  7. (Optional) Run the following command to enable high availability:

    ksv set-ceph-ha

    If the following message appears, high availability is enabled:

    set pool 2 size to 3

    common:NOTE

    Before you run the command to enable high availability, log in to the server node as user root and go the directory generated after the installation package is decompressed.

Use Terminal to add nodes

  1. Log in to the server node on which KSV is installed as user root.

  2. Go to the directory generated after the installation package is decompressed.

  3. Run the following command to edit config-sample.yaml:

    vi config-sample.yaml
  4. Modify the hosts and roleGroups specifications in config-sample.yaml:

    Sample code:

    hosts: - {name: node1, address: 172.31.50.23, internalAddress: 172.31.50.23, user: yop, password: "zhu1241jie"} - {name: node2, address: 172.31.50.24, internalAddress: 172.31.50.24, user: yop, password: "zhu1241jie"} - {name: node3, address: 172.31.50.25, internalAddress: 172.31.50.25, user: yop, password: "zhu1241jie"} roleGroups: etcd: - node1 - node2 - node3 control-plane: - node1 - node2 - node3 worker: - node1 - node2 - node3 registry: - node1

    The following table describes the parameters.

    ParameterDescription
    hosts
    A list of server nodes.
    name
    The name of the node.
    address
    The node IP address for SSH login.
    internalAddress
    The internal IP address of the node.
    user
    The username for SSH login. You must specify as user root or a user that has permissions to run sudo commands. If you leave this parameter empty, user root is specified by default.
    password
    The password for SSH login.
    roleGroups
    A list of node roles.
    etcd
    The node on which etcd is installed. In most cases, etcd is installed on a control node.
    control-plane
    The control node. You can configure multiple control nodes in the cluster.
    worker
    The worker node. You can create VMs on worker nodes. In multi-node mode, a cluster must have at least three worker nodes. A control node can run as a worker node at the same time.
    registry
    Specifies the node on which the registry is deployed. In most cases, the value is the first node in the cluster.
  5. Run the following command to add nodes:

    ./add-nodes.sh

    If the following command output appears, the nodes are added:

    Congratulations! Scaling cluster is successful.

KubeSphere ®️ © QingCloud Technologies 2022