I’m using GKE with more than three spot instance node pools, each with different machine types. I want to globally prioritize one node pool over the others so that the autoscaler scales up nodes in the preferred pool first, falling back to other pools only if the preferred one is unavailable.
I’m looking for a global solution and do not want to use nodeAffinity
on individual workloads.
Is there a way to configure this prioritization globally for the cluster autoscaler? Any guidance would be appreciated!
I see this in the cluster-autoscaler docs
Starting in GKE version 1.27, the cluster autoscaler always considers reservations when making the scale-up decisions. The node pools with matching unused reservations are prioritized when choosing the node pool to scale up, even when the node pool is not the most efficient one. Additionally, unused reservations are always prioritized when balancing multi-zonal scale-ups.
Hence I believe configuring the preferred pool with --total-max-nodes
higher than the others might result in what you want.