Zama Ques
Zama Ques

Reputation: 1534

Queries on GKE Autoscaling

I have both Node Auto Provisioning and Autoscaling enabled on a GKE Cluster. Few queries on Auto Scaling.

For AutoScaling, the minimum nodes are 1 and the maximum number of nodes is 2. Few queries based on this setup.

I set the number of nodes to 0 using gcloud command

gcloud container clusters resize cluster-gke-test --node-pool pool-1  --num-nodes 0 --zone us-central1-c

Now I can see the message that Pods are unscheduleable

 Your cluster has one or more unschedulable pods.

Following are my queries

  1. Since autoscaling is enabled , the nodes should have been automatically spawned in order to run these Pods . But I don't see this happening . Is this not the expected behavior ?

  2. Auto Scaling does not work when we reduce the number of nodes manually?

  3. Auto Scaling works based on load only. If there are requests which cannot be handled by existing nodes then only it will launch new nodes. The minimum number of nodes for Node autoscaling to work should be always greater than zero?

Upvotes: 0

Views: 687

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75775

  1. It's a documented limitation. If your node pool is set to 0, there isn't auto scaling from 0

  2. Yes it works as long as you don't manually scale to 0.

  3. It's also documented. The node pool scale according with the request. If a Pod is unschedulable because of a lack of resource, and the max-node isn't reach, a new node is provisioned and the pod deployed.

you can set 0 to min-nodes, but you must at least have 1 node active in the cluster, on anther node pool

If you specify a minimum of zero nodes, an idle node pool can scale down completely. However, at least one node must always be available in the cluster to run system Pods.

Upvotes: 2

Related Questions