Version: v25.06

Cluster Scale-up

This section describes how to scale up a cluster. The following uses openEuler 22.03 on the Arm64 architecture as an example. The scale-up procedure is the same for other supported operating systems and architectures.

Configuration Requirements

Node Resource Requirements

Table 1 Recommended resource configuration of the worker node

vCPUsMemory (GB)
48

Input image descriptionNOTE
When simultaneous multithreading (SMT) or hyper-threading is disabled, a vCPU is equivalent to a physical core. After SMT or hyper-threading is enabled, the following formula is used for calculating the number of vCPUs: Number of vCPUs = (Number of threads per core x Number of cores) x Number of sockets.

Table 2 Recommended resource configuration of the master node

vCPUsMemory (GB)Number of Worker Nodes
4161–24
83225–100
1664101–150
2464151–200

Input image descriptionNOTE

  • The required resource of the master node increases with the number of worker nodes.
  • When SMT or hyper-threading is disabled, a vCPU is equivalent to a physical core. After SMT or hyper-threading is enabled, the following formula is used for calculating the number of vCPUs: Number of vCPUs = (Number of threads per core x Number of cores) x Number of sockets.

Node Configuration Requirements

  • Select the installation host as the scale-up host.
  • The scale-up host must be connected to the cluster network.
  • Root user login is available on all hosts to be scaled up.

Environment Preparation

Prepare two Linux computers running openEuler 22.03 in an HA cluster or a non-HA cluster.

Table 3 Environment information

Host IP AddressHost NameOperating SystemRole
192.168.0.5node4openEulerScale-up host (the previous installation host)
192.168.0.6node5openEulerMaster node in the cluster
192.168.0.13node12openEulerMaster node to be scaled up
192.168.0.14node13openEulerWorker node to be scaled up

Scale-up Configuration File Example

The following are examples of configuration files for scaling up HA and non-HA clusters. In the following scale-up steps, the cluster planning configuration file is modified to create a cluster scale-up configuration file.

  1. The following is an example YAML file for scaling up an HA cluster.

    yaml
    apiVersion: openfuyao.io/v1beta1
    kind: cluster
    metadata:
        name: example-cluster
    spec:
        nodes:
            masters:
                - hostname: fuyao-master
                  user: root
                  ip: 192.168.0.6
                  port: 22
                  privateKeyPath: /root/.ssh/id_rsa
                  removeTaint: true
                  labels:
                    - name: label-name
                      value: label-value
            workers:
                - hostname: fuyao-worker
                  user: root
                  ip: o.x.y.z
                  port: 22
                  privateKeyPath: /root/.ssh/id_rsa
                  labels:
                    - name: label-name
                      value: label-value
        components:
            - name: kube-vip
              param:
                - name: vip
                  value: 192.168.100.129
                  type: string
                  describe: VIP
                - name: interface
                  value: eth0
                  type: string
                  describe: NIC
  2. The following is an example YAML file for scaling up a non-HA cluster.

    yaml
    apiVersion: openfuyao.io/v1beta1
    kind: cluster
    metadata:
        name: example-cluster
    spec:
        nodes:
            masters:
                - hostname: fuyao-master
                  user: root
                  ip: 192.168.0.6
                  port: 22
                  privateKeyPath: /root/.ssh/id_rsa
                  removeTaint: true
                  labels:
                    - name: label-name
                      value: label-value
            workers:
                - hostname: fuyao-worker
                  user: root
                  ip: o.x.y.z
                  port: 22
                  privateKeyPath: /root/.ssh/id_rsa
                  labels:
                    - name: label-name
                      value: label-value

Scale-up Procedure

  1. Log in to the installation host as the root user.

  2. Download the installation tool and installation script. Skip this step if the installation package has already been downloaded during the cluster installation.

    curl -sfL https://openfuyao.obs.cn-north-4.myhuaweicloud.com/openFuyao/installer/releases/download/v25.06/download.sh | bash -

    By default, the installation package of the latest version is downloaded by running the preceding command. To download the installation package of another version, run the following command with VERSION set to the desired version:

    Input image descriptionNOTE
    For details about how to verify the integrity of the installation package, see Installation Package Integrity Verification.

    export VERSION=x.y.z
    
    curl -sfL https://openfuyao.obs.cn-north-4.myhuaweicloud.com/openFuyao/installer/releases/download/v25.06/download.sh | bash -
  3. Generate a cluster planning configuration file.

    • Go to the installation package directory.

      Input image descriptionNOTE
      Here uses openEuler 22.03 on the Arm64 architecture as an example. Adjust the path according to the actual situation.

      shell
      export INSTALLER_PACKAGE_PATH=fuyao-v25.06-openEuler-22.03-arm64
      
      cd $INSTALLER_PACKAGE_PATH
    • Run the following command to generate a configuration file for an HA cluster:

      shell
      ./fuyao create cluster-config --ha
    • The following shows the content of the configuration file.

      shell
      apiVersion: openfuyao.io/v1beta1
      kind: cluster
      metadata:
          name: example-cluster
      spec:
          nodes:
              masters:
                  - hostname: fuyao-master
                    user: root
                    ip: 192.168.0.6
                    port: 22
                    privateKeyPath: /root/.ssh/id_rsa
                    removeTaint: true
                    labels:
                      - name: label-name
                        value: label-value
              workers:
                  - hostname: fuyao-worker
                    user: root
                    ip: o.x.y.z
                    port: 22
                    privateKeyPath: /root/.ssh/id_rsa
                    labels:
                      - name: label-name
                        value: label-value
          components:
              - name: kube-vip
                param:
                  - name: vip
                    value: 192.168.100.129
                    type: string
                    describe: VIP
                  - name: interface
                    value: eth0
                    type: string
                    describe: NIC
  4. Modify the cluster planning configuration file.

    • Edit the cluster planning configuration file.

      shell
      export HA_ADD_NODE_CONFIG_FILE=example-cluster.yaml
      
      vi $HA_ADD_NODE_CONFIG_FILE
      • Enter the node list information. The following is an example.

        • Enter information about at least one master node and one worker node. The master node information specified in the node list must correspond to an existing master node in the cluster.
        • hostname: name of a node in the cluster, which must be the same as the actual host name.
        • user: username for logging in to the node during deployment. Currently, only the root user is supported.
        • ip: IP address of the node.
        • port: port number used by SSH. The default value is 22.
    • Enter i to enter the edit mode for modifications. After the modifications are complete, enter :wq to save the modifications and exit. The following shows the modified configuration file.

      yaml
      apiVersion: openfuyao.io/v1beta1
      kind: cluster
      metadata:
        name: example-cluster
      spec:
        # Specify the nodes.
        nodes:
          # Master node configuration
          masters:
            # The hostname in the cluster can be different from the hostname of the host.
            - hostname: node5   # Configuration item
              user: root        # Configuration item
              ip: 192.168.0.6   # Configuration item
              port: 22          # Configuration item
              privateKeyPath: /root/.ssh/id_rsa  # Configuration item (optional)
            - hostname: node12  # Configuration item
              user: root        # Configuration item
              ip: 192.168.0.13  # Configuration item
              port: 22          # Configuration item
              privateKeyPath: /root/.ssh/id_rsa  # Configuration item (optional)
              labels:
                - name: node12       # Configuration item (optional)
                  value: master-04   # Configuration item (optional)
          workers:
            - hostname: node13  # Configuration item
              user: root        # Configuration item
              ip: 192.168.0.14  # Configuration item
              port: 22          # Configuration item
              privateKeyPath: /root/.ssh/id_rsa  # Configuration item (optional)
              labels:
                - name: node13      # Configuration item (optional)
                  value: worker-02  # Configuration item (optional)
        components:
          - name: kube-vip  # or non-HA cluster scale-up, the kube-vip component is not required.
            param:
              - name: vip
                value: 192.168.0.50  # Configuration item
                type: string
                describe: VIP
              - name: interface
                value: eth0          # Configuration item
                type: string
                describe: NIC
    • If SSH key–based login is configured for nodes in the cluster during configuration and installation, make sure to configure SSH key–based authentication on the installation host in advance.

  5. Perform scale-up in the installation package directory.

    ./fuyao add nodes -f $HA_ADD_NODE_CONFIG_FILE

    If password-based login is configured for nodes in the cluster, make sure to enter the corresponding node passwords as prompted during the installation.

  6. Check the scale-up result.

    After the automatic scale-up is successful, run the following command on the master node to check the scale-up result. If all pods are in running state, the environment is ready:

    kubectl get pod -A

    Input image descriptionNOTE

    • The scale-up is complete when all pods are in running state. The actual time may vary depending on actual network conditions.
    • The openFuyao authentication and authorization mechanism uses self-signed keys. All authentication and authorization keys and configuration files are stored under /etc/kubernetes/webhook on all master nodes. After the installation is complete, you may choose to remove the files in this path. However, if the files are removed and the API server is restarted, authentication will fail.
    • The components deployed for scale-up using the installation and deployment tool are configured with default settings and are intended only for testing openFuyao platform functions. For a production environment, adjust the security configurations of Kubernetes, container runtime, and network plug-in components.

Precautions:

  • When performing multiple scale-up operations, for example, if you first add worker1, you need to include the information about worker1 in the YAML file. When scaling up the cluster later by adding worker2, you only need to add the information about worker2 to the YAML file, without repeating the information about worker1.

Uninstallation

  1. Log in to the installation host as the root user.

  2. Remove the asset/install-component-manifest.yaml file.

    rm asset/install-component-manifest.yaml
  3. Run the following command to enter the installation package directory:

    shell
    cd $INSTALLER_PACKAGE_PATH

    Edit the configuration file. The modifications to the configuration file should be consistent with those made during installation. Enter information about hostname, user, passwd, ip, and port for the master and worker nodes in the cluster.

    shell
    vi $CLUSTER_HA_CONFIG_FILE

    Input image descriptionCAUTION
    You need to enter the information about the added nodes in the configuration file.

  4. Perform the uninstallation in the installation package directory.

    Input image descriptionNOTICE
    If multiple applications or extensions are installed in the environment through the application market, you are advised to uninstall them through the application management or extension management function. Otherwise, the uninstallation may be slow or fail.

    shell
    ./fuyao destroy cluster -f <cluster-yam-path, eg:./example-cluster.yaml>
  5. When Successfully completed cluster destroy is displayed, the cluster is uninstalled.

    During the uninstallation, the logs generated during the installation and uninstallation are not removed. The logs are stored under /var/log/fuyao-installer/. To remove these logs, run the following command:

    shell
    rm -rf /var/log/fuyao-installer/