Node pool feature is fully launched. You can continue to use the existing scaling groups in the cluster. However, TKE will stop upgrading of the legacy scaling group feature. You can convert the scaling groups to node pools via the CreateClusterNodePoolFromExistingAsg API or TKE console.
For any operations except the management of the existing scaling groups, please use the Node Pool feature.
To help you efficiently manage nodes in a Kubernetes cluster, TKE introduced the concept of node pool. Basic node pool features allow you to conveniently and quickly create, manage, and terminate nodes and dynamically scale nodes in or out.
The overall architecture of a node pool is as follows:
Generally, all nodes in a node pool share the following attributes:
In addition, TKE extends the following features for a node pool:
When you need to use a large-scale cluster, we recommend that you use a node pool to manage nodes to improve the usability of the large-scale cluster. The following table describes multiple use cases for managing large-scale clusters and shows the effect of node pools in each use case.
|A cluster includes many heterogeneous nodes with different model configurations.||A node pool allows you to manage the nodes by groups in a unified manner.|
|A cluster needs to frequently scale nodes in and out.||A node pool improves OPS efficiency and reduces operating costs.|
|The scheduling rules for applications in a cluster are complex.||Node pool labels allow you to quickly specify service scheduling rules.|
|Routine maintenance is required for nodes in a cluster.||A node pool allows you to conveniently upgrade the Kubernetes version and the Docker version.|
TKE Auto Scaling is implemented based on Tencent Cloud AutoScaling and the cluster-autoscaler of the Kubernetes community. The relevant concepts are described as follows:
To meet the requirements of different scenarios, the nodes in a node pool can be classified into the following two types:
It is not recommended to add existing nodes. If you do not have the permission to create nodes, you can add the existing nodes to scale out the cluster. However, some parameters of adding existing nodes may be inconsistent with the template of the node you defined, and the auto scaling cannot be performed.
|Node Type||Node Source||Supporting Auto Scaling||Mode of Removal from Node Pool||Is Node Quantity Affected by Adjust Node Number|
|Nodes in the scaling group||Auto scale-out or manual adjustment of the node quantity||Yes||Auto scale-in or manual adjustment of the node quantity||Yes|
|Nodes outside the scaling group||Manually added to the node pool by users||No||Manually removed by users||No|
Please read how the node pool auto scaling works before using it.
The scale-out of a specific node pool is performed based on the subnet you set when creating the node pool and the subsequent multi-model configuration. Generally, the multi-model policy shall prevail, and the next is the multi-zone/subnet policy.
For example, if you configure multiple models A, B, multiple subnets 1, 2, 3, the scale-out is performed based on A1, A2, A3, B1, B2, and B3 in sequence. If A1 is sold out, the scale-out performed based on A2 instead of B1.
The following figure shows how the node pool auto scale-out works:
The nodes not be scaled in only take effect in cluster level. If you need more fine-grained protection of nodes from being scaled in, you can use the removal protection feature.
The following figure shows how the node pool auto scale-in works:
|Creating a Node Pool||Adds a node pool||
|Deleting a Node Pool||
||When you delete a node pool, if you select to terminate nodes, the nodes will not be retained. You can create new nodes later if required.|
|Enabling auto scaling for a node pool||After you enable auto scaling for a node pool, the number of nodes in the node pool is automatically adjusted according to the workload of the cluster.||Do not enable or disable auto scaling in the Scaling Group page.|
|Disabling auto scaling for a node pool||After you disable auto scaling for a node pool, the number of nodes in the node pool is not automatically adjusted according to the workload of the cluster.|
|Adjusting the number of nodes in a node pool||
|Adjusting a Node Pool||You can modify the node pool name, the operating system, the number of nodes in the scaling group, and the Kubernetes Label and Taint.||Modifications of the Label and Taints attributes take effect for all the nodes in a node pool and may cause Pods to be rescheduled.|
|Adding an existing node||Generally, it is recommended to create a node pool directly.|
|Removing a node from a node pool||You can remove any node from the node pool and you can choose to whether to retain the node in the cluster.||Please do not add nodes to the scaling group in the console, which may result in data inconsistency.|
|Converting an existing scaling group into a node pool||
||This operation is irreversible. Ensure that you are familiar with the features of node pools before conversion.|
You can log in to the TKE console and perform node pool-related operations according to the following documents: