Scaling the Worker Nodes of the Global Service Cluster¶
This article will explain how to manually scale the worker nodes of the global service cluster in offline mode. By default, it is not recommended to scale the global service cluster after deploying the platform. Please plan your resources before deploying the platform.
Note
Note: The control nodes of the global service cluster do not support scaling.
Prerequisites¶
- DCE platform deployment has been completed through Bootstrap Node, and the kind cluster on the Bootstrap Node is running normally.
- You must log in with a user account that has admin privileges on the platform.
Obtain the kubeconfig for the kind cluster on the Bootstrap Node¶
-
Run the following command to log in to the Bootstrap Node:
-
On the Bootstrap Node, run the following command to get the CONTAINER ID of the kind cluster:
[root@localhost ~]# podman ps # Expected output: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 220d662b1b6a docker.m.daocloud.io/kindest/node:v1.26.2 2 weeks ago Up 2 weeks 0.0.0.0:443->30443/tcp, 0.0.0.0:8081->30081/tcp, 0.0.0.0:9000-9001->32000-32001/tcp, 0.0.0.0:36674->6443/tcp my-cluster-installer-control-plane
-
Run the following command to enter the kind cluster container:
-
Inside the kind cluster container, run the following command to obtain the kubeconfig configuration information for the kind cluster:
After the console output, copy the kubeconfig configuration information of the kind cluster for the next step.
Create cluster.kubean.io
resources in the kind cluster on the Bootstrap Node¶
-
Use the podman exec -it {CONTAINER ID} bash command to enter the kind cluster container.
-
Copy and run the following command to create the
cluster.kubean.io
resources in the kind cluster:kubectl apply -f - <<EOF apiVersion: kubean.io/v1alpha1 kind: Cluster metadata: labels: clusterName: kpanda-global-cluster name: kpanda-global-cluster spec: hostsConfRef: name: my-cluster-hosts-conf namespace: kubean-system kubeconfRef: name: my-cluster-kubeconf namespace: kubean-system varsConfRef: name: my-cluster-vars-conf namespace: kubean-system EOF
-
Run the following command in the kind cluster to verify if the
cluster.kubean.io
resource is created successfully:
Update the containerd configuration in the kind cluster on the Bootstrap Node¶
-
Run the following command to log in to one of the control nodes of the global service cluster:
-
On the control node of the global service cluster, run the following command to copy the containerd configuration file config.toml from the control node to the Bootstrap Node:
-
On the Bootstrap Node, run the following command to copy the config.toml configuration file to the kind cluster:
-
Inside the kind cluster, run the following command to restart the containerd service:
Add the kind cluster to the DCE cluster list¶
-
Log in to the DCE management console, go to Container Management, click the "Access Cluster "Add" button on the right side of the cluster list page to enter the cluster access page.
-
In the access configuration section, enter and edit the kubeconfig configuration of the kind cluster that was copied earlier. The following parameters need to be configured:
- Cluster Name : Enter the name for the accessed cluster, default is my-cluster .
- insecure-skip-tls-verify: true : Used to skip TLS verification, manually add this parameter.
- server : Replace the IP in the default parameter
https://my-cluster-installer-control-plane:6443
with the IP of the Bootstrap Node. Replace 6443 with the port mapped on the node. You can use the command podman ps | grep 6443 to check.
-
Click the "Confirm" button to complete the access of the kind cluster.
Add labels to the global service cluster¶
-
Log in to the DCE management console, go to Container Management, find the kapnda-glabal-cluster cluster, and click the Basic Configuration operation button on the right side to enter the basic configuration page.
-
On the basic configuration page, add the label
kpanda.io/managed-by=my-cluster
to the global service cluster, as shown in the following image:
Note
Note: In the label "kpanda.io/managed-by=my-cluster", the value corresponds to the cluster name specified during cluster access, which is my-cluster by default. Adjust it according to your actual situation.
Add nodes to the global service cluster¶
-
Go to the node list page of the global service cluster, find the Integrate Node button on the right side of the node list, and click to enter the node configuration page.
-
Enter the IP and authentication information of the node to be added.
-
Add the following custom parameters in the Custom Parameters section:
-
Click the OK button and wait for the node to be added.