Container Service for Kubernetes (ACK) provides node pools for you to manage nodes in ACK clusters efficiently. Nodes in node pools are easy to manage and maintain. You can configure auto scaling for node pools, manage nodes in batches, and schedule specified nodes in a node pool. Node pools facilitate how you can manage and maintain nodes in an ACK cluster.

Background information

The following content describes the terms related to node pools:
  • Scaling group: the core of auto scaling. After you configure instance configuration sources for a scaling group and enable the scaling group, the number of Elastic Compute Service (ECS) instances in the scaling group can be automatically scaled based on scaling rules. You can also manually add existing ECS instances to the scaling group. For more information, see Overview.
  • Replace system disk: You can initialize a node by replacing the system disk of the node. After the system disk is replaced, the Infrastructure as a Service (IaaS) attributes of the node remain unchanged. For example, the node name, instance ID, and IP address remain unchanged. However, the data on the system disk is deleted when the node is reinitialized. The data disks that are mounted to the node are not affected.
    Notice Do not use system disks to persist data. We recommend that you use data disks to persist data.
  • In-place upgrade: You can directly replace components on a node as required. This is an alternative to replacing the system disk of a node. In-place upgrades do not replace system disks, reinitialize nodes, or destroy the data on nodes.

Overview

A node pool contains one or more nodes in a cluster. The nodes in a node pool use the same configurations. A default node pool is automatically created based on the number of nodes and configurations that you specify when you create a cluster. You can add node pools of different sizes and types to the cluster. You can create and upgrade node pools. This does not affect the cluster.

In most cases, the nodes in a node pool all have the following attributes:
  • The type and version of the operating system.
  • The type and version of the container runtime.
  • The billing method. Pay-as-you-go and subscription are supported. Elastic node pools also support the pay-by-preemptible-instance billing method.
  • The node specification.
  • The CPU scheduling policy.
  • The labels and taints.
  • The user-defined data.
nodepool

How to work with node pools

Before you work with node pools, take note of the following items:
  • You can create multiple node pools in a cluster. Custom node pools, elastic node pools, and managed node pools are supported.
  • Each cluster contains a default node pool. A default node pool has the same definition as a custom node pool and uses the scalable resources that are created for the cluster. If you call API operations to expand a cluster or add ECS instances without specifying a node pool, the nodes or instances that you add belong to the default node. For more information about how to call API operations to expand a cluster and add existing ECS instances to a cluster, see Add worker nodes to a cluster and Add existing ECS instances to a cluster.
  • After you create node pools, you can deploy and manage different types of nodes in a cluster.
    • You can create multiple node pools in a cluster and add nodes that run different types of operating systems to these node pools. The supported operating systems are CentOS, Windows, and AliyunLinux.
    • You can create node pools of different container runtimes in a cluster. Sandboxed-Container and Docker are supported.
    • You can create node pools that adopt different billing methods in a cluster. Supported billing methods are pay-as-you-go, subscription, and pay-by-preemptible-instance.
    • You can configure different scaling rules for node pools in a cluster.
  • Nodes in different node pools can use different configurations.
    • Resource-related configurations: node specifications, vSwitches, system disks, data disks, security groups, and logon types.
    • Node-related configurations: user-defined data, CPU scheduling policies, labels, and taints.

Limits

  • You can create node pools only in clusters of Kubernetes 1.12.6-aliyun.1 or later.

  • By default, you can create up to 20 node pools in each ACK cluster and each node pool can contain up to 1,000 nodes. To increase the quota, Navigate to the Quota Center page to submit a ticket.

Billing

Each node pool corresponds to a scaling group. No additional fees are charged for using node pools. For more information about the billing of scaling groups, see Billing.

Types of node pools

ACK supports custom node pools, default node pools, elastic node pools, and managed node pools.

Each custom node pool corresponds to a scaling group. When you scale a custom node pool, ACK uses the Auto Scaling (ESS) service to add or remove nodes. After you add existing nodes to a custom node pool, ACK automatically adds the corresponding ECS instances to the scaling group for unified management. ACK allows you to perform the following operations on a custom node pool:

  • Scale out the node pool: You can create a scaling group and configure scaling rules to scale out the node pool.
  • Remove specified nodes: You can delete the information of specified nodes from the API server and remove these nodes from the scaling group.
  • Modify the configurations of the node pool: You can modify the configurations of the node pool and update the information of the corresponding scaling group.
  • Clone the node pool: You can clone the node pool.
  • Delete the node pool: You can delete the node pool and the corresponding scaling group only after you remove all nodes from the node pool.

A default node pool is associated with the scaling group that is automatically assigned when you create the cluster. No other scaling groups are created for the default node pool. If you call API operations to add nodes and scale out a node pool, the nodes are added to the default node pool by default. You cannot delete a default node pool. Except for the delete operation, all of the other operations that you can perform on a custom node pool are supported by a default node pool. ACK allows you to perform the following operations on a default node pool:

  • You cannot delete a default node pool. All other operations that you can perform on a custom node pool are supported by a default node pool.
  • When you create a cluster, a default node pool is automatically created for the cluster.
  • Existing dedicated Kubernetes clusters that are deployed across three zones are assigned three scaling groups. Each scaling group corresponds to a default node pool.

You can create an elastic node pool in the same way as creating a custom node pool. After you create an elastic node pool in a cluster, the cluster-autoscaler component is deployed in the cluster. This component counts the number of containers in the cluster and then triggers scaling activities. For more information, see Auto scaling of nodes in Related documentation.

Elastic node pools are different from custom node pools in the following ways:

  • You cannot manually scale an elastic node pool.
  • You must configure the maximum number and minimum number of instances to specify the maximum and minimum sizes of the elastic node pool.
  • Elastic node pools support the pay-by-preemptible-instance billing method.
  • Elastic node pools support GPU instances, shared GPU instances, and CPU instances.
  • You can disable auto scaling to switch an elastic node pool to a regular node pool. However, you cannot switch a regular node pool to an elastic node pool.

Managed node pools are provided by Alibaba Cloud for ACK. Managed node pools support auto upgrading and auto node repairing. This enables centralized, managed, and operations and maintenance (O&M)-free lifecycle management on nodes. You do not need to be concerned about the maintenance of cluster nodes, such as component upgrades, OS upgrades, and patching of fix Common Vulnerabilities and Exposures (CVE)-identified vulnerabilities. ACK automatically fixes anomalies of nodes in a managed node pool. For more information, see Overview of managed node pools in Related documentation.

Comparison among different types of node pools

Item Default node pool Custom node pool Elastic node pool Managed node pool
Scaling method Manual scaling. Manual scaling. Auto scaling.
Note Manual scaling is not supported.
Manual scaling.
Whether the node pools can be deleted No. Yes.
Note You must remove all nodes from a custom node pool before you can delete the custom node pool.
Yes. Yes.
Note You must remove all nodes from a managed node pool before you delete the managed node pool.
Billing method Pay-as-you-go and subscription. Pay-as-you-go and subscription. Pay-as-you-go and pay-by-preemptible-instance. Pay-as-you-go and subscription.
Node upgrading
  • Only manual upgrading is supported.
  • Only kubelet versions can be upgraded.
  • Only in-place upgrades are supported.
  • Only manual upgrading is supported.
  • Only kubelet versions can be upgraded.
  • Only in-place upgrades are supported.
  • Only manual upgrading is supported.
  • Only kubelet versions can be upgraded.
  • Only in-place upgrades are supported.
  • Auto upgrading within a specified maintenance window is supported.
  • Manual upgrading is supported.
  • Allows you to upgrade the operating system, Docker version, and Kubelet version of nodes. You can also upgrade image versions to fix new CVE vulnerabilities.
  • Upgrades are triggered by replacing system disks.
Logon type Supports both key pairs and passwords. Supports both key pairs and passwords. Supports both key pairs and passwords. Supports only key pairs. Logons with passwords are not supported.
Auto repairing Not supported. Not supported. Not supported. Supported.