Course contentsShow
← Cloud and Infrastructure
Lesson 1458 of 2,98929. Kubernetes ObservabilityFree lesson

Cluster Autoscaler Integration

How pod autoscaling triggers cluster autoscaling, understanding node provisioning, and coordinating HPA with node scaling.

Cluster Autoscaler Integration

What you'll learn: How pod autoscaling triggers node-level scaling and how to coordinate HPA with cluster infrastructure changes.

The Missing Piece in Autoscaling

You've learned that HPA scales pods horizontally and VPA adjusts their resource requests. But what happens when your cluster runs out of capacity? If HPA wants to create 10 new pods but no nodes have room, those pods sit in Pending state. This is where Cluster Autoscaler bridges the gap between pod-level and infrastructure-level scaling.

How Pod Autoscaling Triggers Node Provisioning

Cluster Autoscaler monitors your cluster for unschedulable pods—pods that can't be placed because nodes lack CPU, memory, or other resources. When it detects pending pods:

  1. HPA creates new pod replicas based on metrics
  2. Scheduler tries to place them but finds insufficient node capacity
  3. Cluster Autoscaler notices the pending pods and calculates resource needs
  4. It requests new nodes from your cloud provider (AWS, GCP, Azure)
  5. Once nodes are ready, pending pods get scheduled automatically

Think of it like a restaurant: HPA is the manager adding more waiters (pods) during rush hour, while Cluster Autoscaler expands the dining room itself (nodes) when there's no space for new waiters.

Coordinating HPA with Node Scaling

The key to smooth operation is understanding timing and resource requests:

  • Pod resource requests matter: Cluster Autoscaler uses your pod's requests (not limits) to calculate how many nodes are needed
  • Scale-up is reactive: Nodes typically take 2-5 minutes to provision, creating temporary lag
  • Scale-down is cautious: Cluster Autoscaler waits ~10 minutes before removing underutilized nodes to avoid thrashing

Always set accurate resource requests in your deployments—they guide both the scheduler and Cluster Autoscaler in making intelligent decisions.

Key Takeaway: Cluster Autoscaler completes the autoscaling story by adding nodes when HPA-scaled pods can't be scheduled, ensuring your cluster infrastructure grows and shrinks with application demand.