If your business requires quick startup without considering node resource limits, you can use the ack-autoscaling-placeholder component. This component provides a buffer for cluster auto scaling. When node resources are insufficient, the actual workload preempts the pre-reserved resources to achieve quick startup. This works in conjunction with node auto scaling to force cluster scaling at the node level. This topic describes how to use ack-autoscaling-placeholder to scale pods within seconds.
Operation process
Prerequisites
Auto scaling is enabled for the Container Service for Kubernetes (ACK) cluster and an elastic node pool is configured. For more information, see Enable node auto scaling.
Node labels are configured for the elastic node pool to schedule workloads to the specified node pool for result verification. For more information, see Create and manage a node pool.
This topic uses the
demo=yeslabel as an example.
Step 1: Deploy the ack-autoscaling-placeholder component and create a placeholder workload
ack-autoscaling-placeholder provides a buffer for cluster auto scaling. This allows cluster nodes to be over-provisioned and preheated in advance and ensures that workloads can be scaled quickly without waiting for nodes to be created and join the cluster.
Log on to the ACK console. In the left-side navigation pane, choose .
On the App Catalog tab, search for ack-autoscaling-placeholder, and then click ack-autoscaling-placeholder.
On the ack-autoscaling-placeholder page, click Deploy.
In the Deploy panel, complete the configuration as prompted, and then click OK.
Replace the Parameters in the Parameters tab with the following YAML example.
After the creation, on the page, you can see that the status of the application is Deployed.
Step 2: Create PriorityClass for the actual workload
Create a file named
priorityClass.yamland copy the following content to the file:apiVersion: scheduling.k8s.io/v1 kind: PriorityClass metadata: name: high-priority value: 1000000 #Configure priority, which should be higher than the default priority of the placeholder pod in the previous step. globalDefault: false description: "This priority class should be used for XYZ service pods only."Run the following command to deploy the PriorityClass for the actual workload:
kubectl apply -f priorityClass.yamlExpected output:
priorityclass.scheduling.k8s.io/high-priority created
Step 3: Create the actual workload
Create a file named
workload.yamland copy the following content to the file:Run the following command to deploy the actual workload:
kubectl apply -f workload.yamlExpected output:
deployment.apps/placeholder-test created
Verify the results
After the placeholder workload ack-place-holder is created, the pod status is running.

When deploying an actual workload, a configured high-priority PriorityClass preempts the resources of the placeholder workload to achieve a quick start. The pods of the placeholder workload are evicted and remain in a Pending status due to insufficient node resources.
The actual workload placeholder-test is quickly deployed on the node where the placeholder workload is located.

The placeholder workload is evicted and in a Pending status.

Due to the auto scaling feature being enabled for the node pool, insufficient node resources trigger node scaling, and the placeholder workload is scheduled to the newly scaled node in the running state.

References
For more information about how to enable auto scaling for cross-zone deployment in high availability scenarios, see Implement rapid scaling across multiple zones.