Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

gke not scaling down the nodes.

I have setup gke cluster with only one worker node , I enabled the cluster autoscaler using this command , labelled by node-pool as app=angular-app

gcloud container clusters update cluster-1 --enable-autoscaling --node-pool=default-pool --min-nodes=1 --max-nodes=2 --region=us-central1-c

After that I deployed my angular app with replica 1 using my YAML file

angular-deployment-request-limit.png

After deploying my angular app using YAML file I increased the replicas to 7 , It scaled and provisioned a worker node but now when I changed the replicas from 7 to 1 , the worker is not scaling down even though the number of pod is 1.

pod-1.png

My question why the node is not scaling down , and what is solution to decrease the worker node  as for 1 pod one worker node is more than sufficient.

Note :- RAM :- 4gb , cpu :- 2cpu for one worker node.

Solved Solved
0 3 2,874
1 ACCEPTED SOLUTION

Are you sure on your initial deployment that everything fit on a single node?
You might also want to update the autoscaling profile to "optimize utilization" as well.

View solution in original post

3 REPLIES 3

Are you sure on your initial deployment that everything fit on a single node?
You might also want to update the autoscaling profile to "optimize utilization" as well.

yes I am sure , upto 6 replicas no new worker node was launched , when I changed the value to 7 a new worker node got created , now even changing the replica value to 1 the other worker node is not scaling down.

Thanks after applying autoscaling-profile optimize-utilization using gcloud container clusters update cluster-3 --autoscaling-profile optimize-utilization --location=us-central1-c

when the replica is decrease like replica=1  , it is scale down perfectly without any issue.

Top Labels in this Space