Container Service for Kubernetes (ACK) allows you to create node pools and manage nodes in a cluster by node pool. For example, you can centrally manage the labels and taints of the nodes in a node pool. This topic describes how to create a node pool in an ACK cluster and how to adjust the number of nodes in a node pool.
Prerequisites
- Make sure that you have a sufficient node quota in the cluster. To increase the node quota, Submit a ticket. For more information about the resource quotas related to ACK clusters, see Limits.
- When you add an existing Elastic Compute Service (ECS) instance to a node pool, make sure that the ECS instance is associated with an elastic IP address (EIP) or a NAT gateway is configured for the virtual private cloud (VPC) where the ECS instance is deployed. In addition, make sure that the ECS instance can access the Internet. Otherwise, you cannot add the ECS instance to the node pool.
Background information
Considerations
Some system components are installed in the default node pool. When the system automatically scales the default node pool, the system components may become unstable. If you want to use the auto scaling feature, we recommend that you create a new node pool that has auto scaling enabled.
Create a node pool
Modify the expected number of nodes in a node pool
The expected number of nodes specifies the number of nodes that a node pool must keep. After you specify the expected number of nodes in a node pool, the nodes in the node pool are automatically scaled to the specified number. For more information about the scaling rules, see Rules for changes to the expected number of instances.
Node pools that are configured with the Expected Nodes parameter and those that are not configured with the parameter have different reactions to operations such as removing nodes and releasing ECS instances. For more information, see What are the differences between node pools that are configured with the Expected Nodes parameter and those that are not configured with this parameter?.
- Scale out the node pool: Set the expected number of nodes to a value that is greater than the current value. Then, the node pool is automatically scaled out. If you want to scale out a node pool, we recommend that you use this method. This way, the system can automatically add nodes to the node pool if you fail to manually add nodes to the node pool.
- Scale in the node pool: Set the expected number of nodes to a value that is smaller
than the current value. Then, the node pool is automatically scaled in.
Notice
- If you use the ECS or Auto Scaling console or use the ECS or Auto Scaling API to remove nodes or release instances in a node pool, the node pool automatically scales to the expected number of nodes. A node pool also scales to the expected number of nodes when the subscription instances in the node pool expire and are automatically released. Therefore, if you want to change the number of nodes in a node pool, modify the expected number of nodes or manually remove nodes from the node pool in the ACK console. For more information, see Remove a node.
- When a scale-in activity is triggered by changing the expected number of nodes, ACK can remove nodes without the need to drain the nodes first. We recommend that you manually remove nodes if you want to drain the nodes to be removed. For more information, see Remove a node.
Modify a node pool
Find the node pool that you want to modify and click Edit in the Actions column. For more information about the parameters, see Create a node pool. The following list describes some of the parameters:
- Operating System: Change the operating system version for the nodes.
- ECS Label: Add labels to the ECS instances.
- Node Label: Add labels to the nodes to be added to the cluster.
Note
- If you select Add Labels and Taints to Existing Nodes, the specified labels and taints are synchronized to the existing nodes in the node pool. This does not change the labels and taints that you previously added to the existing nodes.
-
If you select Set New Nodes to Unschedulable, nodes that are newly added to the cluster are marked as unschedulable. You can go to the Nodes page and set the nodes as schedulable.
- Taints: Add taints to the nodes to be added to the node pool.
Add free nodes to a node pool
Free nodes are nodes that are not added to node pools. Free nodes exist in clusters that were created before the node pool feature is released.
What to do next
- Enter a node pool name into the search box to the right side of the Name drop-down list. Then, click
to search for the node pool.
- Click Details in the Actions column to view the node pool details.
- Choose Actions column of a node pool to repair the node pool.
Note
- ACK needs to restart the node to be repaired in certain scenarios. In these scenarios, ACK automatically drains the node before it restarts the node. Make sure that the cluster has sufficient idle nodes for the draining operation. For example, you can scale out the node pool before ACK drains the node to be repaired.
- Nodes are repaired one by one. When ACK is running a repair task, ACK cannot pause the task until it finishes repairing the current node. You can click Resume to resume the paused task, or cancel the task.
in the - Click Sync Node Pool to query and update the information and status of node pools and nodes in the cluster. If you modified the cluster nodes or the status of the nodes is different from the actual status, you can click Sync Node Pool to update the status of the nodes.
- Click the name of the node pool that you want to manage. On the details page of the
node pool, you can perform the following operations:
- Click the Overview tab to view information about the cluster, node pool, node configurations, and auto scaling settings.
- Click the Nodes tab to view information about the nodes in the node pool. You can select multiple nodes and remove them at the same time.
- Click the Nodes tab. In the upper-right corner of the tab, you can click Export to export node information to a comma-separated values (CSV) file.
- Click the Nodes tab and select Display Only Failed Nodes to view nodes that failed to be created.
- Click the Scaling Activities tab to view the latest scaling events of the node pool.