All Products
Search
Document Center

Container Service for Kubernetes:Enable node instant scaling

Last Updated:Apr 08, 2025

Compared with node auto scaling, node instant scaling enables scaling clusters on a large scale or at a faster pace. This feature lowers the technical skill requirements for developers, improves resource scaling efficiency, and reduces the need for manual O&M efforts.

Before you start

To better work with the node instant scaling feature, we recommend that you read Node scaling and pay attention to the following items before you start:

对How node instant scaling works

对Benefits of node instant scaling

对Use scenarios of node instant scaling

对Usage notes for node instant scaling

Prerequisites

Note

If your node pool has auto scaling enabled and Scaling Mode is not set to Swift, the node instant scaling feature is compatible with the original semantics and behavior of the node pool configuration. In addition, this feature can be seamlessly enabled for all types of pods. If Scaling Mode is set to Swift, the node instant scaling feature is incompatible with the node pool.

The following processes describe how to enable this feature:

  1. Step 1: Enable node instant scaling: You must enable the node auto scaling feature at the cluster level so that the auto-scaling policies set for the node pool take effect.

  2. Step 2: Create a node pool that has auto scaling enabled: The node auto scaling feature takes effect for node pools that are configured with auto-scaling. You must set the scaling mode of the node pool to automatic mode.

Step 1: Enable node instant scaling

Before you use node instant scaling, you must enable auto scaling on the Node Pools page.

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

  2. On the Clusters page, find the cluster to manage and click its name. In the left-side navigation pane, choose Nodes > Node Pools.

  3. On the Node Pools page, click Enable next to Node Scaling.

    1.jpg

  4. If this is the first time you use auto scaling, complete authorization as prompted. If you have already completed the authorization, skip this step.

    • For an ACK managed cluster, authorize ACK to use the AliyunCSManagedAutoScalerRole for accessing your cloud resources.

    • For an ACK dedicated cluster, authorize ACK to use the KubernetesWorkerRole and AliyunCSManagedAutoScalerRolePolicy for scaling management. The following figure shows the console page on which you can make the authorization when you enable Node Scaling.

      image

  5. In the Node Scaling Configuration panel, set Node Scaling Method to Auto Scaling, configure scaling parameters, and then click OK.

    Scale-out activities are automatically triggered based on the actual scheduling status.

    Node Scaling Method can be changed after the configuration. You can change it to Auto Scaling. Read the instructions on this page and complete the operations. This feature is available to whitelisted users. To use this feature, submit a ticket.

    Parameter

    Description

    Scale-in Threshold

    Specify the ratio of the resource request of a node to resource capacity of the node in a node pool that has node instant scaling enabled.

    A scale-in activity is performed only when the combined total of CPU and memory utilization of a node is lower than the Scale-in Threshold.

    GPU Scale-in Threshold

    The scale-in threshold for GPU-accelerated nodes.

    A scale-in activity is performed only when the combined total of CPU, memory, and GPU utilization of a node is lower than the Scale-in Threshold.

    Defer Scale-in For

    The interval between the time when the scale-in threshold is reached and the time when the scale-in activity (reduce the number of pods) starts. Unit: minutes. Default value: 10.

    Important

    The autoscaler performs scale-in activities only when Scale-in Threshold is configured and the Defer Scale-in For condition is met.

    View advanced scale-in settings

    Parameter

    Description

    Pod Termination Timeout

    The maximum amount of time to wait for pods on a node to terminate during a scale-in activity. Unit: seconds.

    Minimum Number of Replicated Pods

    The minimum number of pods allowed in each ReplicaSet before nodes are scaled down. When the number of replicas in the ReplicaSet to which the pod belongs is fewer than this parameter, the nodes are not scaled in.

    Evict DaemonSet Pods

    When enabled, DaemonSet pods are evicted during a scale-in activity.

    Skip Nodes Hosting Kube-system Pods

    When enabled, nodes with pods running in the kube-system namespace are ignored during a scale-in activity, ensuring they are not affected.

    Note

    This feature does not take effect on the Mirror Pod and DaemonSet Pod.

Step 2: Create a node pool that has auto scaling enabled

The node instant scaling feature scales only nodes in node pools that have auto scaling enabled. Therefore, after configuring node instant scaling, you also need to configure at least one node pool that has auto scaling enabled.

image

  • Create a new node pool that has auto scaling enabled. For more information, see Create a node pool.

  • Enable auto scaling for an existing node pool. For more information, see Modify a node pool.

We recommend that you configure a diverse range of instance types for your node pool. This can be achieved by specifying multiple instance types, using specific instance types, and configuring multiple availability zones. These methods help ensure a sufficient inventory of instance types and the successful execution of node scaling activities.

Step 3: (Optional) Verify node instant scaling

After you complete the preceding configuration, you can use the node instant scaling feature. The node pool displays that auto scaling is enabled and node auto scaling is installed in the cluster.

Auto scaling is enabled for the node pool

The Node Pools page shows that auto scaling is enabled for the node pool.

The node instant scaling component is installed

  1. On the Clusters page, find the one you want to manage and click its name. In the left-side navigation pane, choose Operations > Add-ons.

  2. On the Add-ons page, the ACK GOATScaler component displays Installed.

Introduction to key events related to node instant scaling

The node instant scaling feature involves the following key events. This helps you learn the internal status of node instant scaling when these events occur.

Event name

Event object

Description

ProvisionNode

pod

The node instant scaling feature triggers a node scale-out activity.

ProvisionNodeFailed

pod

The node instant scaling feature fails to trigger a node scale-out activity.

ResetPod

pod

The node instant scaling feature re-adds pods that meet the scale-out conditions and have triggered scale-out activities but are still in the Unschedulable state to the scale-out list.

InstanceInventoryStatusChanged

ACKNodePool

The supply status of an instance specification in the configured zone changes. The format is {InstanceType}/{Zone} inventory status changed from {OldInventoryStatus} to {NewInventoryStatus}.

For more information, see View the health status of node instant scaling.

Introduction to node instant scaling labels

The node instant scaling feature maintains the following labels. Do not manually modify these labels in case exceptions occur.

Node labels

Node label

Description

goatscaler.io/managed:true

Identifies nodes that are managed by the node instant scaling feature. The node instant scaling feature periodically checks whether nodes that have this label meet the scale-in conditions.

k8s.aliyun.com: true

Identifies nodes that are managed by the node instant scaling feature. The node instant scaling feature periodically checks whether nodes that have this label meet the scale-in conditions.

goatscaler.io/provision-task-id:{task-id}

Indicates the ID of a scale-out task run by the node instant scaling feature so that you can trace the source of the nodes that are added to the cluster.

Node taints

Node taint

Description

goatscaler.io/node-terminating

Nodes that have this taint are scaled in by the node instant scaling feature.

Pod annotations

Pod annotation

Description

goatscaler.io/provision-task-id

Indicates the ID of a scale-out task that is created by the node instant scaling feature for the current pod. The node instant scaling feature does not add another node for a pod that has this annotation and waits for the current node to launch.

goatscaler.io/reschedule-deadline

Indicates the time that the node instant scaling feature waits for a pod to be scheduled to a node. If this time is exceeded and the pod is still unschedulable, the node instant scheduling feature re-adds the pod to the scale-out list.

FAQ

Category

Subcategory

Issue

Scaling behavior of node instant scaling

Known limitations

Scale-out behavior

Scale-in behavior

Custom scaling behavior

Use pods to control scaling

How does node instant scaling use pods to control node scale-in activities?

Use nodes to control scaling

Node instant scaling component

What to do next

View health status of node instant scaling

The node instant scaling feature supports dynamically selecting types and zones based on the inventory status of Elastic Compute Service (ECS) instances. To monitor the health of the instance within a node pool, obtain configuration suggestions for instance optimization, and ensure the execution of node scaling activities, check the ConfigMap of the node pool. This allows you to assess the health status of the node pool inventory, evaluate its inventory, and proactively analyze and adjust instance types.

For more information, see View the health status of node instant scaling.

Enable log collection for the node instant scaling component

If you are using an ACK managed cluster, you can collect logs for the node instant scaling component on the Control Plane Component Logs page.

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

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose Operations > Log Center.

  3. On the Log Center page, click the Control Plane Component Logs tab, and click Update Component in the upper-right corner of the page. In the Update Component message, select the node instant scaling component.

    image

    Wait for the component update to finish. After completion, select the node instant scaling component from the component drop-down list to view its logs.

    image

Update Node Auto Scaling

We recommend that you update Node Auto Scaling at your earliest convenience to use the latest features and optimizations. For more information, see Manage components.