Nodes in Container Service for Kubernetes (ACK) clusters are physical or virtual machines that are used to run containerized applications. A node pool is a group of nodes that have the same configurations or nodes that are used for the same purpose, such as nodes that have the same specifications, zones, labels, and taints. Node pools facilitate the management and O&M of the nodes in clusters. You can specify the node attributes when you create a node pool or modify the configurations of an existing node pool.
Prerequisites
An ACK cluster is created. For more information, see Create an ACK managed cluster.
Node pool types
Regular node pool: You can use a regular node pool to manage a set of nodes that have the same configurations, such as specifications, labels, and taints. For more information, see Node pool overview.
Managed node pool: Managed node pools provide automated O&M features, such as automatic Common Vulnerabilities and Exposures (CVE) vulnerability patching and automatic node repair. For more information, see Overview of managed node pools.
NoteOnly ACK Pro clusters support managed node pools.
For more information about the differences between the two types of node pools, see the Comparison between managed node pools and regular node pools section of the "Overview of managed node pools" topic.
Procedure
When you create or modify a node pool, the nodes and services in other existing node pools are not affected.
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose .
On the Node Pools page, click Create Node Pool. In the Create Node Pool dialog box, configure the parameters that are described in the following table.
Basic settings
Advanced settings
Expand Advanced Options (Optional) to configure the Scaling Policy for the node.
Parameter
Description
Scaling Policy
Priority: The system scales the node pool based on the priorities of the vSwitches that you select for the node pool. The vSwitches that you select are displayed in descending order of priority. If Auto Scaling fails to create ECS instances in the zone of the vSwitch with the highest priority, Auto Scaling attempts to create ECS instances in the zone of the vSwitch with a lower priority.
Cost Optimization: The system creates instances based on the vCPU unit prices in ascending order. Preemptible instances are preferentially created when multiple preemptible instance types are specified in the scaling configurations. If preemptible instances cannot be created due to reasons such as insufficient stocks, the system attempts to create pay-as-you-go instances.
When Billing Method is set to Preemptible Instance, you can configure the following parameters in addition to the Enable Supplemental Preemptible Instances parameter:
Percentage of Pay-as-you-go Instances: Specify the percentage of pay-as-you-go instances in the node pool. Valid values: 0 to 100.
Enable Supplemental Pay-as-you-go Instances: After you enable this feature, Auto Scaling attempts to create pay-as-you-go ECS instances to meet the scaling requirement if Auto Scaling fails to create preemptible instances for reasons such as that the unit price is too high or preemptible instances are out of stock.
Distribution Balancing: The even distribution policy takes effect only when you select multiple vSwitches. This policy ensures that ECS instances are evenly distributed among the zones (the vSwitches) of the scaling group. If ECS instances are unevenly distributed across the zones due to reasons such as insufficient stocks, you can perform a rebalancing operation.
ImportantYou cannot change the scaling policy of a node pool after the node pool is created.
When Billing Method is set to Preemptible Instance, you can specify whether to turn on Enable Supplemental Preemptible Instances. After this feature is enabled, when a system message that indicates preemptible instances are reclaimed is received, the node pool with auto scaling enabled attempts to create new instance to replace the reclaimed the preemptible instances.
Expand Advanced Options (Optional) to configure parameters such as Resource Group, ECS Tags, and Taints.
Click Confirm Order.
If the Status column of the node pool in the node pool list displays Initializing, the node pool is being created. After the node pool is created, the Status column of the node pool displays Active.
What to do next
After the node pool is created, in the node pool list, you can perform one of the operations that are described in the following table.
UI | Description | References |
Sync Node Pool | If the node information is abnormal, you can synchronize the node pool. | N/A |
Details | View the details of the node pool. | N/A |
Edit | Modify the configurations of the node pool. For example, you can modify the vSwitch, managed node pool settings, billing method, instance type, or auto scaling settings of the node pool. | |
Monitor | View basic monitoring information about ECS instances collected by Managed Service for Prometheus. | |
Scale | Adjust the expected number of nodes to scale the node pool. This helps reduce costs. | |
Logon Mode | Modify the logon mode of the node pool. You can choose between Key Pair and Password logon mode. | The Basic settings section of this topic |
Configure Managed Node Pool | Configure managed node pool settings, such as the auto recovery rule, auto update rule, and auto CVE vulnerability patching. | The Basic settings section of this topic |
Add Existing Node | Automatically or manually add existing ECS instances to the cluster. | |
Clone | Clone a node pool that contains the expected number of nodes based on the current node pool configurations. | N/A |
Node Repair | If an exception occurs on the nodes in the managed node pool, ACK automatically repairs the nodes. | |
CVE Patching (OS) | Patch high-risk CVE vulnerabilities in nodes with a few clicks. | |
Kubelet Configuration | Modify the kubelet configurations. | |
OS Configuration | If the default OS parameters of a Linux system do not meet your business requirements, you can customize the OS parameters of nodes within the node pool. | |
Change Operating System | Change the operating system type of nodes or upgrade the operating system version. | N/A |
Kubelet Update | Update nodes at the node pool level, including updates to the kubelet and container runtime. | |
Delete | Delete the current node pool to save costs. |
FAQs
How do I create a custom image based on an existing ECS instance and use it to create nodes?
After creating an ECS instance, you can customize it based on your business requirements, such as installing software and deploying application environments. Then, you can create a custom image from this instance. Instances created from this image contain all of the custom configurations, which eliminates the need to configure these items for each new instance.
Log on to the ECS instance and run the following commands to delete the specified files. For more information about how to log on to the instance, see Use Workbench to connect to a Linux instance over SSH.
chattr -i /etc/acknode/nodeconfig-* rm -rf /etc/acknode systemctl disable ack-reconfig rm -rf /etc/systemd/system/ack-reconfig.service rm -rf /usr/local/bin/reconfig.sh rm -rf /var/lib/cloud
Create a custom image based on the ECS instance. For more information about considerations and detailed steps, see Create a custom image from an instance.
Configure a node pool and select Custom Image for Operating System. Follow the preceding steps to complete the creation of the node pool.
Create a custom image based on the operating system supported by the ACK cluster. For more information, see OS images.
Do not build custom images on running ECS instances in an ACK cluster. To do this, you must first remove the ECS instances from the cluster. For more information, see Remove a node.
The predefined behavior logic in a custom image may affect operations such as cluster node initialization, container launching, node updates, and automatic recovery of nodes in a managed node pool. Before you use it in a production environment, ensure that the custom image has been tested and validated.
References
When a node is no longer required, remove it by following the steps in Remove nodes.
ACK reserves a certain amount of node resources to run Kubernetes components and system processes. For more information, see Resource reservation policy.
You can use the node scaling feature to enable ACK to automatically scale nodes when resources in the current cluster cannot fulfill pod scheduling. For more information, see Overview of node scaling.