Create and manage node pools

Updated at:

A node pool groups nodes that share the same configuration, such as instance types, zones, operating systems, labels, and taints, so you can manage them at once. A cluster can have multiple node pools of different configurations and types, and changing one never affects nodes or applications in another.

Before creating a node pool, read Connect to cloud-based ECS computing resources to understand node pool basics, use cases, related features, and billing.

Limitations

The following parameters cannot be modified after a node pool is created:

Parameter Constraint
Region Fixed to the cluster's region
VPC Fixed to the cluster's virtual private cloud (VPC)
Security hardening Cannot be changed after the cluster is created
Billing method Cannot switch between spot instances and other billing methods
Custom security group Type (basic or advanced) cannot be changed after creation

Prerequisites

Before you begin, make sure you have:

If your cluster version does not meet the requirement above, create a custom script for the node pool before proceeding.

Navigate to node pools

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of the target cluster. In the left navigation pane, choose Nodes > Node Pools.

Create a node pool

Configure the node pool in the ACK console, including the basic, network, instance, image, storage, and scaling settings. Some settings, especially those related to node pool availability and networking, cannot be changed after creation. Creating a node pool does not affect the nodes or workloads of other node pools.

In the following tables, the Changeable column indicates whether a parameter can be modified after the node pool is created: Supported indicates that the parameter can be modified, and Not supported indicates that it cannot.

  1. On the Node Pools page, click Create Node Pool.

  2. In the Create Node Pool dialog box, configure the parameters described in the following sections.

  3. Click Confirm.

After you click Confirm, the node pool list shows the new pool with Initializing status while it is being created. When creation succeeds, the status changes to Active.

On the confirmation page, click Console-to-Code in the lower-left corner to get Terraform or SDK sample code matching your node pool configuration.

Basic configurations

Parameter Description Changeable
Node pool name A name for the node pool. Supported
Region Pre-selected based on the cluster's region. Cannot be changed. Not supported
Scaling mode Manual or Auto. The two modes let you adjust compute resources to match business requirements and policies, which reduces cluster costs.
- Manual: maintains the exact number of nodes you specify in Expected number of nodes. See Manually scale a node pool.
- Auto: scales out when pod scheduling demand exceeds cluster capacity, based on configured minimum and maximum instance counts. Clusters running Kubernetes 1.24 or later use node instant scaling by default; earlier versions use node auto scaling. See Node scaling.

Supported

Network configurations

Parameter Description Changeable
VPC Pre-selected as the cluster's VPC. Cannot be changed.

Cloud resources and billing: imageVPC

Not supported
vSwitch Determines the zones where new nodes are created during scale-out, based on the Scaling policy you choose. For high availability, select vSwitches in at least two of your target zones. If no vSwitch is available, click Create vSwitch. See Create and manage vSwitches.

Cloud resources and billing: imageVPC

Supported

Instance and image configurations

Parameter Description Changeable
Billing method The billing method for ECS instances added to the node pool: Pay-As-You-Go, Subscription, or Spot Instance.
- Pay-As-You-Go: instances can be enabled and released on demand.
- Subscription: configure Duration and optionally enable Auto renewal.
- Spot Instance: Only spot instances with a protection period are supported. You must also configure Upper Price Limit of Current Instance Spec. If the real-time price of the specified instance type is lower than the maximum price per instance, the instance is created. After the protection period (1 hour), the system checks the spot price and resource availability every 5 minutes. If the real-time price exceeds your bid or inventory is insufficient, the instance is released. See Best practices for spot instance-based node pools.

Important

Billing method changes apply only to newly added nodes. Existing nodes retain their original billing method. To change the billing method of an existing node, see Change the billing method from pay-as-you-go to subscription. You cannot switch between spot instances and pay-as-you-go or subscription billing.

Trusted Execution Environment (TEE)-enabled container image node pools (using ecs.g7t series instances) do not support billing method changes. Such changes return the InvalidImageType.TEE.NotSupported error. To use Subscription billing, create a new Subscription node pool that does not use a TEE-enabled image.






Supported
Instance type Select one or more ECS instance types for worker nodes. Filter by vCPU, memory, instance family, and architecture. Selecting multiple instance types improves scale-out success rates. If scale-out fails due to unavailable instance types, add more types to the pool. The instance types actually used for scale-out are determined by the configured scaling policy. See ECS specification recommendations for ACK clusters and check the scalability of the node pool. Supported
Operating system Public image or Custom image.
- Public image: Alibaba Cloud Linux 3 container-optimized image, ContainerOS, Alibaba Cloud Linux 3, or Ubuntu. See Operating systems.
- Custom image: use a custom OS image. See How do I create a custom image based on an existing ECS instance and use it to create nodes?
Alibaba Cloud Marketplace Image is in phased release. To upgrade or change the OS, see Change the OS.
  • Alibaba Cloud Marketplace Image: Use an Alibaba Cloud Marketplace image.



  • Supported
    Security hardening Choose one of the following options. Cannot be changed after the cluster is created.
    • Disable: no security hardening applied.

    • MLPS security hardening: provides baseline check standards and scanning tools that meet MLPS 2.0 Level 3 compliance requirements for Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 images, and adapts the images to the requirements of GB/T 22239-2019 (Information Security Technology - Baseline of Classified Protection of Cybersecurity) while retaining native image compatibility and performance.

      Important

      When MLPS security hardening is enabled, SSH root login is prohibited. Use VNC to log on from the ECS console and create regular users for SSH access. See Connect to an instance by using VNC.

    • OS security hardening : available only for Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 images.

    Not supported
    Logon method Set key pair or Set password.
    - Set key pair: an SSH key pair is a secure and convenient logon authentication method that consists of a public key and a private key. Supported only for Linux instances. Specify the Username (root or ecs-user) and the key pair.
    - Set password: password must be 8–30 characters and include uppercase letters, lowercase letters, digits, and special characters. Specify the Username (root or ecs-user) and the password.
    Note

    When MLPS security hardening is selected, only Set password is supported.




    Supported
    Username If you set Logon method to Set key pair or Set password, specify whether to log on as root or ecs-user. Supported

    Storage configurations

    Parameter Description Changeable
    System disk Supported types: ESSD AutoPL, Enterprise SSD (ESSD), ESSD Entry, Standard SSD, and Ultra Disk. Available types depend on the instance families you select.
    For Enterprise SSD (ESSD), set the performance level (PL). Higher PLs require larger capacity: PL2 requires more than 460 GiB; PL3 requires more than 1,260 GiB. See Capacity and PLs .
    Encryption is available for Enterprise SSD (ESSD) only. The default service CMK is used by default; you can also use an existing BYOK CMK from KMS.
    Select More system disk types to specify disk types other than the system disk type and improve scale-out success rates. When ACK creates a node, it uses the first disk type that matches, in the order that you specify.

    Cloud resources and billing: imageECS Elastic Block Storage




    Supported
    Data disk Supported types: ESSD AutoPL, Enterprise SSD (ESSD), ESSD Entry, SSD, and Ultra Disk. Available types depend on the instance families you select. Disk types that are not displayed are not supported.
    ESSD AutoPL supports performance provision (for sustained above-baseline performance) and performance burst (for read/write spikes).
    Enterprise SSD (ESSD): configure a custom PL. PL2 requires more than 460 GiB; PL3 requires more than 1,260 GiB.
    Encryption is available for all data disk types. Create data disks from snapshots to accelerate container image loading and large language model (LLM) initialization.
    During node creation, the last data disk is automatically formatted. The system mounts /var/lib/container to this disk and mounts /var/lib/kubelet and /var/lib/containerd to /var/lib/container. To customize mount points, modify the data disk initialization configuration. Select at most one data disk as the directory that is occupied by the container runtime. See Can I mount a data disk to a custom directory in an ACK node pool?
    Select Add Data Disk Type to specify disk types other than the data disk type and improve scale-out success rates. When ACK creates a node, it uses the first disk type that matches, in the order that you specify.
    Note

    Up to 64 data disks can be attached to an ECS instance, depending on the instance type. To check the limit for a specific type, call the DescribeInstanceTypes operation and check the DiskQuantity parameter.

    Cloud resources and billing: imageECS Elastic Block Storage







    Supported
    Elastic ephemeral disk
    This is a whitelisted feature. Submit a ticket to apply

    Elastic ephemeral disks provide high-performance, cost-effective temporary data storage for ECS instances. They are suitable for storing temporary data (such as intermediate results of temporary computations, cached data, and temporary files) and for high-performance computing (HPC) scenarios with high IOPS and throughput requirements.

    This feature is only available in some regions and for some ECS instance types. For more information, see Region limits and Instance type limits.

    You can choose whether to initialize the elastic ephemeral disk and customize its mount directory.

    Cloud resources and billing: imageECS Elastic Block Storage

    Supported

    Number of instances

    Parameter Description Changeable
    Expected number of nodes The total number of nodes the node pool maintains. A minimum of 2 nodes is recommended so that cluster components run properly. Set to 0 if you do not need nodes at creation time. See Manually scale a node pool. Supported

    Advanced configurations

    Expand Advanced options (optional) to configure the following parameters.

    Parameter Description Changeable
    Resource group Assign the node pool to the selected resource group. Resource groups help you manage permissions and allocate costs. Each resource can belong to only one resource group. Supported
    Scaling mode Applies only when the node pool uses Auto scaling mode.
    - Standard: scales by creating and releasing ECS instances.
    - Swift: scales by creating, stopping, and then restarting ECS instances. When the node pool scales out again, ACK restarts the stopped instances directly, which improves the scaling speed. Stopped ECS instances incur storage costs only, not compute costs. This mode does not apply to instance families that provide local storage, such as big data instance families and local SSD instance families. For billing details and precautions about the ECS instance stop mode, see Economical mode.

    Not supported
    Scaling policy Determines how new nodes are distributed across zones during scale-out.
    - Priority: scales in the priority order of the vSwitches configured for the cluster (vSwitches are prioritized from top to bottom). If a zone is unavailable, the next zone is tried.
    - Cost optimization: creates instances from the lowest to the highest vCPU unit price. If the node pool uses Spot Instance , spot instances are prioritized. Configure the Percentage of pay-as-you-go instances (%) . If a spot instance type cannot be created due to insufficient inventory or other reasons, ACK automatically supplements it with pay-as-you-go instances.
    - Distribution balancing: distributes ECS instances evenly across zones, which takes effect only in multi-zone scenarios. If the zone distribution becomes unbalanced due to insufficient inventory, you can run the balancing operation again.


    Supported
    Supplement spot capacity with on-demand instances Requires Spot Instance billing. When enabled, ACK automatically creates pay-as-you-go instances if spot instances cannot be provisioned due to price or inventory constraints.

    Cloud resources and billing: imageECS Instance

    Supported
    Enable supplemental spot instances Requires Spot Instance billing. When a reclamation notice is received (5 minutes before reclamation), ACK attempts to provision new spot instances as replacements. If compensation succeeds, ACK drains and removes the old nodes. If it fails, ACK does not drain the old nodes, and the expiring instance is still reclaimed after 5 minutes. ACK retries when inventory and pricing conditions are met. Proactive release of spot instances may cause business exceptions. To improve the compensation success rate, enable Supplement spot capacity with on-demand instances alongside this option. See Best practices for spot instance-based node pools.

    Cloud resources and billing: imageECS Instance

    Supported
    ECS tags Tags added to ECS instances during auto scaling, as identifiers for cloud resources. ACK and Auto Scaling reserve 3 tags (ack.aliyun.com:Cluster ID, ack.alibabacloud.com/nodepool-id:Node pool ID, and acs:autoscaling:scalingGroupId:Scaling group ID), leaving a maximum of 17 user-defined tags per node (ECS limit is 20 total).
    Note

    When auto scaling is enabled, the tags k8s.io/cluster-autoscaler:true and k8s.aliyun.com:true are added by default. The cluster autoscaler reformats node labels and taints for simulation: labels become k8s.io/cluster-autoscaler/node-template/label/key:value and taints become k8s.io/cluster-autoscaler/node-template/taint/key/value:effect. To increase the tag quota, submit a request in the Quota Center console.


    Supported
    Taints Taints consist of a key, a value, and an effect. Constraints:
    - Key: 1–63 characters; letters, digits, hyphens (-), underscores (_), and periods (.); must start and end with a letter or digit. For a prefixed key, the prefix must be a subdomain name (≤253 characters, ending with /).
    - Value: up to 63 characters; same character rules as key; can be blank.
    - Effect: NoSchedule, NoExecute, or PreferNoSchedule.
    - NoSchedule: new pods that do not tolerate the taint are not scheduled to the node, while running pods are unaffected.
    - NoExecute: non-tolerating pods are evicted when the taint is added.
    - PreferNoSchedule: the scheduler avoids placing non-tolerating pods on the node.
    See Taints and tolerations .






    Supported
    Node labels Labels are key-value pairs. Constraints for keys:
    - 1–63 characters; letters, digits, hyphens (-), underscores (_), and periods (.); must start and end with a letter or digit.
    - For a prefixed key, the prefix must be a subdomain name (≤253 characters, ending with /).
    - Reserved prefixes (cannot use): kubernetes.io/, k8s.io/, and any prefix ending with these. Exceptions: kubelet.kubernetes.io/, node.kubernetes.io, and prefixes ending with those.
    Values: up to 63 characters; same character rules as key; can be blank.



    Supported
    Custom node name When enabled, the node name, ECS instance name, and ECS hostname are all set to a custom value. Format: prefixIP substringsuffix.
    - Total length: 2–64 characters; must start and end with a lowercase letter or digit.
    - Prefix (required): letters, digits, hyphens (-), and periods (.); must start with a letter; cannot end with a hyphen or period; no consecutive hyphens or periods.
    - Suffix (optional): same rules as prefix.
    Example: IP 192.XX.YY.55, prefix aliyun.com, suffix test → Linux node name: aliyun.com192.XX.YY.55test. Windows nodes use hyphens instead of periods in the hostname (for example, 192-XX-YY-55).

    Method 1: Full IP address + prefix/suffix: if you enable Sync to Node Hostname, the node hostname is set to the node name, and the segments of the IP address are joined by the specified separator. For example, if the separator is -, the ECS instance hostname is aliyun.com192-XX-YY-55test. If the separator is ., the ECS instance hostname is aliyun.com192.XX.YY.55test. If you do not enable this option, the hostname keeps the default naming rule.

    Method 2: Specified number of IP address digits + prefix/suffix (whitelisted feature): the node name consists of a prefix, a specified number of digits from the node IP address, and a suffix. For example, if the node IP address is 192.XX.YY.55, the prefix is aliyun.com, the suffix is test, and the number of truncated IP digits is 6, the node name is aliyun.com0YY055test. If the VPC CIDR block is large and the number of truncated IP digits (lenOfIP) is insufficient, node names conflict and node scale-out fails in node instant scaling scenarios. Set lenOfIP to at least 9 for CIDR blocks such as 10.0.0.0/8 and 172.16.0.0/12, and at least 6 for the 192.168.0.0/16 CIDR block.

    Method 3: Sync instance hostname (whitelisted feature): applies only to Lingjun node pools, and Lingjun node pools support only this method. The hostname of a Lingjun node is synced to the node name. For example, if the instance hostname is test, the node name is test.

    Method 4: Incremental ID + prefix/suffix (whitelisted feature, supported only for ECS node pools): the node name consists of a prefix, an incremental ID, and a suffix, in the format auto_increment,name_prefix(AUTO_INCREMENT)[begin_number,bits]name_suffix (no space between [begin_number,bits]). For more information about the rules, see Fixed increment sorting. beginNumber ranges from 0 to 999999 and defaults to 0. The specified starting value takes effect on the first scale-out. On subsequent scale-outs, it increments from the largest existing number in the scaling group. bits ranges from 1 to 6 and defaults to 6. If beginNumber has more digits than the value of bits, bits defaults to 6. Set bits to at least 3 to avoid reaching the numbering limit. If the limit is reached while you still need to scale out, the scale-out fails and stops. Reset the naming rule to continue. For example, if the format is auto_increment,start(AUTO_INCREMENT)[1,3]end, node names are generated in sequence: start001end, start002end, and so on. If a scaled-out ECS instance fails to start, it is removed and a new instance is scaled out, so the numbers may not be consecutive. You cannot enable node scaling together with this method, and a node pool for which node scaling is enabled cannot be switched to this method.





    Not supported
    Pre-custom instance data A script that runs on nodes before they join the cluster. Requires a quota application in the Quota Center console. See User-data scripts.
    For example, if you set the pre-custom data to touch /tmp/pre-script, the scripts that run on a node are combined in the following order.
    #!/bin/bash
    # The specified pre-custom data runs here.
    touch /tmp/pre-script
    
    # The ACK node initialization script runs here.

    For the effect of this parameter during node initialization, see Node initialization process.


    Supported
    Instance user data A script that runs on nodes after they join the cluster. See User-data scripts.
    For example, if you set the user data to touch /tmp/post-script, the scripts that run on a node are combined in the following order.
    #!/bin/bash
    # The ACK node initialization script runs here.
    
    # The specified user data runs here.
    touch /tmp/post-script

    For the effect of this parameter during node initialization, see Node initialization process. After you create a cluster or add nodes, a successful operation does not indicate that the user-data script ran as expected. Log on to a node and run grep cloud-init /var/log/messages to check the execution log.


    Supported
    Cloud Monitor agent Installs the Cloud Monitor agent on new nodes, enabling you to view the metrics and running status of nodes and applications in the Cloud Monitor console. Applies to newly added nodes only. To install the agent on existing nodes, go to the Cloud Monitor console directly.

    Cloud resources and billing: imageCloud Monitor

    Supported
    Public IP address Assigns a public IPv4 address to each new node. If enabled, configure Bandwidth billing method and Peak bandwidth. Applies to newly added nodes only. To enable internet access for an existing node, associate an EIP with the node .

    Cloud resources and billing: imageECS public network

    Supported
    Custom security group Select Basic security group or Advanced security group. Only one type can be selected, and the type cannot be changed after creation. Each ECS instance supports up to 5 security groups. Make sure the quota is sufficient. If you select an existing security group, security group rules are not configured automatically; configure them manually. See Configure security group rules to enforce access control on ACK clusters and Security groups. Not supported
    RDS whitelist Adds node IP addresses to the whitelist of an ApsaraDB RDS instance. Supported
    Deployment set Distributes ECS instances across physical servers for high availability. Create a deployment set in the ECS console first, then specify it here.
    Important

    After selecting a deployment set, the maximum number of nodes in the pool is 20 × number of zones. The number of zones depends on the number of vSwitches. Make sure the ECS quota for the selected deployment set is sufficient. See Best practices for associating deployment sets with node pools.

    Not supported
    Private pool type
    This parameter is deprecated. Use Resource Pool Policy to specify a private pool instead.
    Controls whether a capacity reservation private pool is used when creating instances.
    - Open: automatically matches an open private pool; falls back to the public pool if none is found.
    - Do not use: uses only the public pool.
    - Specified: uses the specified private pool by ID; instance creation fails if the pool is unavailable.
    See Private pools.



    Supported

    Edit a node pool

    After a node pool is created, you can update some node pool parameters in the console, including vSwitches, billing method, instance type, system disk, and auto scaling settings. For the full list of editable parameters, see the Changeable column in the parameter tables above.

    Important
    • Modifying a node pool does not affect nodes or applications in other node pools of the cluster.

    • In most cases, updated configurations apply only to newly added nodes. Exceptions: ECS tags, node labels, and taints (changes to these also apply to existing nodes).

    • If you have modified nodes outside of the node pool configuration (for example, directly on the ECS instance), those changes are overwritten when you update the node pool.

    When switching Scaling mode:

    • Manual to Auto: enables auto scaling and requires configuring minimum and maximum instance counts.

    • Auto to Manual: disables auto scaling, sets minimum instances to 0 and maximum to 2,000, and sets Expected number of nodes to the current node count.

    Steps:

    1. On the Node Pools page, find the node pool and click Edit in the Actions column.

    2. In the dialog box, modify the parameters and follow the on-screen instructions.

    The node pool status shows Updating during the update and returns to Active when complete.

    View a node pool

    Click the name of a node pool to view its details across four tabs:

    • Basic information: cluster, node pool, and node configuration details. If auto scaling is enabled, elastic scaling settings are also shown here.

    • Monitoring: CPU usage, memory usage, disk usage, and average CPU/memory per node, powered by Alibaba Cloud Prometheus.

    • Node management: lists all nodes in the pool. Remove, drain, schedule, or perform operations and maintenance (OM) on individual nodes. Click Export to download the node list as a CSV file.

    • Scaling activities: records of recent scaling events, including the instance count after each activity and the activity description. If an activity fails, you can view the failure reason. For common error codes, see Error codes and solutions for scaling failures.

    Delete a node pool

    Important

    Review the node release rules below before you delete the node pool.

    Node release behavior depends on whether Expected number of nodes is configured for the pool and the billing method of each node.

    Node pool with Expected number of nodes configured:

    Billing method What happens to the node
    Pay-as-you-go Released after the node pool is deleted
    Subscription Retained after the node pool is deleted

    Node pool without Expected number of nodes configured:

    Node source What happens to the node
    Manually or automatically added nodes Retained (not released)
    Subscription nodes Retained (not released)
    Other nodes Released when the node pool is deleted

    For a node pool with Expected number of nodes configured, deleting the node pool removes all its nodes from the cluster's API server. For a node pool without it, released nodes are removed and retained nodes stay registered.

    To release a retained subscription node, change its billing method to pay-as-you-go first, then release the ECS instance from the ECS console.

    Steps:

    1. (Optional) Click the node pool name. On the Basic information tab, check whether Expected number of nodes is configured. A hyphen (–) means it is not configured.

    2. On the Node Pools page, find the node pool, click image Delete in the Actions column, then confirm in the dialog box.

    Warning
    • The system disks and data disks of a node are released together with the node. All data on the disks is permanently deleted and cannot be restored. To retain data, use persistent volumes (PVs) to decouple the data lifetime from the node lifetime.

    • Before you delete the default node pool, check whether pods of system components such as CoreDNS and NGINX Ingress controllers run on its nodes. If such pods exist, migrate them to another node pool first. Otherwise, DNS resolution or Ingress routing of the cluster is interrupted.

    • Deleting a node pool has the following impacts:

      • The node pool contains no nodes: no impact.

      • The node pool contains nodes that do not run business pods: brief traffic interruptions may occur for NodePort Services.

      • The node pool contains nodes that run business pods: the pods are rescheduled. Make sure that other node pools have sufficient resources to accommodate the rescheduled pods. Otherwise, your business may be interrupted.

    What's next