For large clusters or latency-sensitive workloads where node auto scaling is insufficient, enable node instant scaling for faster node provisioning and lower costs.
Before you begin
To make better use of this feature, read node scaling before this topic and understand the following concepts:
-
How node instant scaling works
-
Benefits and supported use cases
-
Usage notes
-
To avoid unexpected charges, use pay-as-you-go instances. During scale-in, subscription instances are removed from the cluster but are not released from your account.
Prerequisites and limitations
-
This feature is supported only on ACK managed cluster or ACK dedicated cluster that runs Kubernetes 1.24 or later. To upgrade the cluster, see Manually upgrade a cluster.
-
Auto Scaling is activated.
-
The vSwitch for the node instant scaling node pool must have sufficient IP addresses to avoid node creation failures. Call DescribeVSwitchAttributes to check available IPs.
If IP addresses are insufficient, see Expand cluster IP capacity by adding a secondary CIDR block.
-
Node instant scaling is compatible with the semantics and behavior of existing autoscaling node pools, and all application types can be enabled and used seamlessly, provided that the node pool has auto scaling enabled and its Scaling Mode is not Swift mode. Node instant scaling is not compatible with node pools in this mode.
-
With ACK GOATScaler v0.5.3 or earlier, manually remove offline nodes. See FAQ.
-
In an ACK dedicated cluster, nodes must have sufficient resources to deploy or update ACK GOATScaler; otherwise, scaling may fail. Ensure that node resources are sufficient.
-
Evicting DaemonSet Pods from empty nodes is currently not supported.
This feature involves the following process:
-
Step 1: Enable node instant scaling: the auto scaling policy you configure for a node pool takes effect only after node instant scaling is enabled at the cluster level.
-
Step 2: Configure a node pool for auto scaling: node instant scaling takes effect only for node pools that have auto scaling configured. Therefore, you must also set the scaling mode of the specified node pool to Auto.
Step 1: Enable node instant scaling
To use node instant scaling, enable and configure cluster auto scaling on the Node Pools page so that nodes can scale.
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Node Pools page, click Enable next to Node Scaling.
-
If prompted, activate Auto Scaling and grant the required permissions. Skip this step if the service is already activated and authorized.
-
ACK managed cluster: Authorize the AliyunCSManagedAutoScalerRole role.
-
ACK dedicated cluster: Authorize the KubernetesWorkerRole role and attach the AliyunCSManagedAutoScalerRolePolicy system policy.
In the Node Scaling Configuration dialog box, after the precheck passes, click the RAM role link (such as
KubernetesWorkerRole-xxxx) to complete authorization in the RAM console.
-
-
On the Node Scaling Configuration page, set Node Scaling Plan to Instant Scaling, configure the scaling parameters, and click OK.
The scaling component automatically triggers node scale-outs based on scheduling conditions.
Switch the Node Scaling Plan to node auto scaling at any time. Follow the on-screen prompts. This feature is in beta. To participate, submit a ticket.
Parameter
Description
Scale-in Threshold
The ratio of resource requests to the total resource capacity of a node in a node pool with node autoscaling enabled.
A node is eligible for scale-in only if its CPU and memory resource utilization are both below the Scale-in Threshold.
GPU Scale-in Threshold
The scale-in threshold for GPU instances.
A GPU instance is eligible for scale-in only when its CPU, memory, and GPU utilization all fall below the configured GPU Scale-in Threshold.
Scale-in Trigger Delay
The delay between when a node becomes eligible for scale-in and when the scale-in operation is performed. Unit: minutes. Default value: 10 minutes.
ImportantThe scaling component can perform a node scale-in only after the Scale-in Threshold condition is met and the Scale-in Trigger Delay duration has passed.
Step 2: Configure a node pool for auto scaling
Node instant scaling applies only to nodes in node pools with auto scaling enabled, so configure at least one such node pool.
-
Create a node pool and set Scaling Mode to Auto.
-
Edit an existing node pool to change its Scaling Mode to Auto.
Recommended: Configure multiple instance types, specify instance attributes, or configure multiple availability zones to ensure sufficient capacity during scale-outs.
(Optional) Step 3: Verify the configuration
Verify that auto scaling is active and ACK GOATScaler is installed.
Verify node pool status
On the Node Pools page, the node pool list shows the node pools that have auto scaling enabled.
Verify add-on installation
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons .
-
On the Add-ons page, ensure the ACK GOATScaler add-on status is Installed.
Node instant scaling key events
The node instant scaling feature generates the following key events during scale-outs and scale-ins so that you can check its internal running status, configure monitoring and alerts, and locate problems.
The involvedObject of an ACKNodePool event is in the ACKNodePool/<NodePoolID> format.
View key events
You can run kubectl commands to query the key events generated by node instant scaling.
# 1. Query all events emitted by node instant scaling (GoatScaler), sorted by time
kubectl get events -n default --field-selector source=GOATScaler --sort-by='.lastTimestamp'
# 2. Query the events of a specific node pool (ACKNodePool)
# Replace NodePoolID with the actual node pool ID
kubectl get events -n default --field-selector source=GOATScaler,involvedObject.kind=ACKNodePool,involvedObject.name=<nodepool-id> --sort-by='.lastTimestamp'
# 3. Query the events of a specific pod
kubectl get events -n <namespace> --field-selector involvedObject.name=<pod-name> --sort-by='.lastTimestamp'
# 4. Filter events by reason. Example: query only scale-out failures
kubectl get events -n default --field-selector source=GOATScaler,reason=FailedToScaleUp
Scale-out events
|
Event name (Reason) |
Object |
Event type |
Description |
|
ProvisionNode |
|
Normal |
node instant scaling is pre-allocating nodes for the pod. |
|
ProvisionNodeFailed |
|
Warning |
node instant scaling failed to pre-allocate nodes for the pod. If this event occurs, check the quota and inventory of the node pool. |
|
ResetPod |
|
Normal |
node instant scaling resets pods that meet the requirements and have already triggered a scale-out but remain unschedulable, so that the pods re-enter the scheduling queue and can trigger a scale-out again. |
|
NotTriggerScaleUp |
|
Normal |
node instant scaling did not trigger a pod scale-out because no node pool matched. If this event occurs frequently, check the node pool configurations (such as whether the instance types, labels, and taints match), the node pool inventory, and whether the node pool has reached the maximum number of nodes. |
|
ScaledUp |
|
Normal |
The node pool is scaled out. |
|
FailedToScaleUp |
|
Warning |
The node pool failed to scale out, including scale-out timeouts. If this event occurs, check the quota, inventory, permissions, and images. |
|
DisableInstanceTypes |
|
Normal |
Some instance types of the node pool are temporarily disabled after a scale-out failure. If this event occurs frequently, the inventory of the instance types may be insufficient. |
Scale-in events
Pod events
|
Event name (Reason) |
Object |
Event type |
Description |
|
ScaleDown |
|
Normal |
Pods are being evicted because the node is being scaled in. |
|
ScaleDownFailed |
|
Warning |
Failed to evict the pod. If this event occurs, check the PodDisruptionBudget (PDB) configurations and the pod status. |
Node events
|
Event name (Reason) |
Object |
Event type |
Description |
|
ScaleDown |
|
Normal |
The node is being scaled in, including evicting the pods on the node, deleting the node, and removing the node from the node pool. |
|
ScaleDownFailed |
|
Warning |
The node failed to scale in, for example, the node failed to be marked for deletion, cordoned, evicted, or removed from the node pool. If this event occurs, check the node status and permissions. |
|
ScaleDownLimited |
|
Warning |
The node scale-in is limited by the minimum number of nodes (minSize) of the node pool. If this event occurs, check the minSize configuration of the node pool. |
ACKNodePool events
|
Event name (Reason) |
Object |
Event type |
Description |
|
ScaleDownAbnormal |
|
Normal |
Abnormal nodes are deleted, such as nodes that stay in the NotReady state for an extended period, nodes that time out during initialization, and nodes that are not removed after being marked for deletion. If this event occurs frequently, check the node health status. |
|
ScaleDown |
|
Normal |
Nodes are removed from the node pool, for example, nodes that you specify to delete and nodes with low utilization that trigger a scale-in. |
|
ScaleDownEmpty |
|
Normal |
Empty nodes are deleted. |
|
FailedToScaleDown |
|
Warning |
The node pool failed to scale in. If this event occurs, check the permissions and node status. |
|
DeleteNodeFailed |
|
Warning |
Failed to delete the node object from the Kubernetes cluster. If this event occurs, check the connection to the API server. |
|
NodeDeletionLimited |
|
Warning |
Node deletion is limited by the minimum number of nodes (minSize) of the node pool, for example, empty nodes, abnormal nodes, nodes with low utilization, and missing instances. |
Inventory status events
|
Event name (Reason) |
Object |
Event type |
Description |
|
NodePoolInventoryStatusChanged |
|
Normal/Warning |
The inventory status of the node pool changed. You can monitor the inventory based on this event. |
|
InstanceInventoryStatusChanged |
|
Normal |
is emitted when the supply status of an instance type in a configured zone changes, in the format: {InstanceType}/{Zone} inventory status changed from {OldInventoryStatus} to {NewInventoryStatus}. |
Monitoring and alerting recommendations
Configure monitoring and alerts based on the key events so that you can detect and handle anomalies at the earliest opportunity.
|
Event |
Recommended alert level |
Recommended action |
|
ProvisionNodeFailed, FailedToScaleUp |
Critical |
The scale-out failed. Check the quota, inventory, and permissions of the node pool. |
|
ScaleDownFailed, FailedToScaleDown, DeleteNodeFailed |
Critical |
The scale-in failed. Check the PDB configurations, node status, and permissions. |
|
NotTriggerScaleUp |
Warning |
If this event occurs frequently, for example, more than 10 times within 5 minutes, check the node pool configurations. |
|
ScaleDownAbnormal |
Warning |
If this event occurs frequently, for example, more than 5 times within 1 hour, check the node health status. |
|
ScaleDownLimited, NodeDeletionLimited |
Warning |
Check the minSize configuration of the node pool. |
Node instant scaling identifiers
These identifiers are system-managed. Modifying them may cause unexpected scaling behavior.
Node labels
-
goatscaler.io/managed:trueork8s.aliyun.com: true: Identifies nodes managed by node instant scaling. Node instant scaling periodically checks whether these nodes meet the scale-in conditions. -
goatscaler.io/provision-task-id:{task-id}: The task ID of the node scale-out, so that you can trace what triggered the creation of the node.
Node taints
-
goatscaler.io/node-terminating: Nodes with this taint are marked for scale-in.
Pod annotations
-
goatscaler.io/provision-task-id: The scale-out task ID for this pod. The system waits for the node to start before triggering more scale-outs. -
goatscaler.io/reschedule-deadline: Pod scheduling timeout. If still unschedulable past this deadline, the pod is requeued and can trigger another scale-out.
FAQ
Related operations
View health status
The node instant scaling feature selects instance types and availability zones based on ECS inventory. Check the node pool ConfigMap to monitor inventory health and get instance type recommendations, so that node scaling activities can be executed successfully.
Enable log collection
For ACK managed clusters, collect ACK GOATScaler logs from the Control Plane Component Logs page.
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Control Plane Component Logs tab, click Update Component and select ACK GOATScaler.
In the Update Component dialog box, select
ack-goatscalerand click OK.Wait for the component update to finish. After the update, select ACK GOATScaler from the component drop-down list to view its logs. This component is displayed as ack-goatscaler in the drop-down list.
Upgrade ACK GOATScaler
Keep ACK GOATScaler updated for the latest features. See Components.
Skip inventory checks for private pools
If you use a private pool for guaranteed capacity, enable SkipInventoryCheck to let ACK GOATScaler skip inventory checks on non-private-pool resources during scale-outs and use the reserved private pool capacity directly.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons .
-
On the Core Component page, find ACK GOATScaler and click Configuration.
Requires ACK GOATScaler v0.3.0-582e405-aliyun or later. If your version is earlier, upgrade the add-on before you continue.
-
Set
SkipInventoryCheckto true.