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
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.
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! Go to 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.
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.