Let's say I have two nodepools in my GKE cluster:
- e2-standard-32-nodepool ($0.347 per hour per instance)
- e2-highmem-16-nodepool ( $0.2345 per hour per instance)
Both the nodepools are set to use spot instances.
Now I have a deployment, which needs to scale up and the pod can get schedule on any of the VM(e2-standard-32 or e2-highmem-16).
I want to understand, which nodepool GKE will decide to scale.
I tried searching GKE documentation, but did;t find anything specific.
It does mention Autoscaling profiles, which is more like - the decision of when to remove a node.
But no logic, or parameters/factors - which decide the scaling out of nodepool.
When scaling up for a workload that can be scheduled to more than one node pool, according to the public documentation for autoscaler, the cluster autoscaler does take into account the cost.
Just take note of the wording, it specifically says attempts, there's no explicit guarantee there.
GKE uses an internal fork of the open-source version of Cluster Autoscaler, with GKE-specific features and optimisations. Because of that there is no direct mapping of the internal configuration to the open-source one. There are some shared values, but there are no publicly available documentations
As per GKE documentation, the optimize utilization profile makes Cluster Autoscaler scale-down more frequently and aggressively than it would using the "default" profile.
There is no disclosed information for the specifics of the underlying thresholds, as they may be subject to change in the future.