NodeScalingPolicy (cluster-scoped)
Modes
NodePool mode (default): adjusts a single GKE managed node pool’s size. Heterogeneous mode: provisions individual GCE VMs with per-pod machine type selection — similar to CAST AI or Karpenter. The bin-packer selects the cheapest machine type that fits pending pods from a configurable list of allowed series.Scale-up triggers
The scaler provisions new nodes when:- Pending pods exist (not scheduled to any node)
- Cluster CPU or memory utilization exceeds the scale-up threshold (default 80%)
- The pending pod count has been stable for 3+ evaluation cycles (~3–6 min)
Scale-down triggers
The scaler removes nodes when:- Average utilization drops below the scale-down threshold (default 40%)
- No pods are in Pending phase anywhere in the cluster
- The target node is older than 10 minutes (grace period for metrics to stabilize)
- The node is not the sole provider of a taint profile (workload isolation)
- No rebalance is actively executing
For the full scale-down guard list and the interaction between continuous scale-down and
scheduled maintenance consolidation, see Node Scale-Down Behavior.
Machine type selection
In heterogeneous mode, the bin-packer:- Collects all pending pods
- Groups them by taint profile + PV zone
- For each group, selects the cheapest machine type from the allowed series that fits the pods
- Respects
packingHeadroom(default: 10% CPU, 5% memory reserved for burst)
[c2d, t2d, n2d, e2] by default.
Key behaviors
- PV-aware zone provisioning — nodes are created in the same zone as bound PersistentVolumes.
- Taint/label propagation — pod nodeSelectors and tolerations are cloned to provisioned VMs.
- 10-minute grace period — new nodes are protected from scale-down until metrics stabilize.
- Proportional scale-down — removes 20–50% of excess nodes per cycle (not one at a time).