As the workload in the cluster increases, you may find that the current resources are insufficient to meet the actual needs. You can expand your cluster by adding compute resources. For example, if your cluster contains more than 10 nodes, you can add more worker nodes to improve resource utilization while retaining a simple structure for maintenance. This topic describes how to add worker nodes to a cluster.

Prerequisites

You have created a Kubernetes cluster. For more information, see Create an ACK cluster.

Procedure

  1. Log on to the Container Service console.
  2. In the left-side navigation pane, choose Clusters > Clusters to go to the Clusters page.
    • To purchase new nodes and add them to a cluster, see Expand clusters or use the following steps.
      1. Find the target cluster and click Expand in the Actions column to go to the Expand page.Expand a cluster
      2. Set the number of worker nodes to add.
        Expand a cluster
      3. Configure the new worker nodes.Expand a cluster
      4. Set the logon type.
        Expand a cluster
      5. Set the RDS whitelist.Expand a cluster
      6. Attach labels to new nodes.Expand a cluster
      7. Click Submit.
    • To add existing nodes to a cluster, use the following steps:
      1. Find the target cluster and click More > Add Existing Node in the Actions column.
        Add existing nodes

        On the Add Existing ECS Instance page, you can select the Auto or Manual mode to add ECS instances. For more information, see Add existing nodes. In this example, select the Auto mode.

      2. Select Auto and choose ECS instances in the following list. Then click Next Step.
        Add automatically
      3. Specify the instance information, set the CPU policy, logon password, and labels, and then click Next Step.
        Instance information
      4. In the dialog box that appears, click OK. The selected ECS instances are automatically added to the cluster.
         ECS
  3. In the left-side navigation pane, choose Clusters > Nodes. Verify that the newly added nodes are in the Running state.

What to do next

To remove a node from a cluster, select the target cluster on the Nodes page, find the node that you want to remove, and then click More > Remove. In the dialog box that appears, click OK.
Note
  • To ensure the stability of your application, we recommend that you add new nodes first and then remove unnecessary nodes.
  • You can also configure PodDisruptionBudget (PDB) objects to minimize the negative effects on your application when you remove nodes.