Reputation: 16729
I have a GKE
cluster with 2 nodes. A web application runs on them. I changed the .yaml
file to have only one replica of the application.
Now I want to reduce the size of the cluster to 1 but the cluster size seems to stay two.
I have tried several options (editing default pool size via UI and also the following command - gcloud container clusters resize myclustername --node-pool mypoolname --num-nodes 1
But after the operation finishes, I still see two nodes.
gcloud container clusters resize myclustername --node-pool mypoolname --num-nodes 1
Pool [default-pool] for [...] will be resized to 1.
Do you want to continue (Y/n)? Y
Resizing codingjedi-web...done.
Updated [https://container.googleapis.com/v1/projects/.../zones/europe-west2-a/clusters/...].
no_reply@cloudshell:~ (...)$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
gke-...-default-pool-d842095f-nq6t Ready <none> 3m48s v1.16.15-gke.4901
gke-...-default-pool-d842095f-zdlr Ready <none> 12m v1.16.15-gke.4901
Upvotes: 0
Views: 1317
Reputation: 68
Maybe the auto-scaler immediately scaled up after you resized your cluster. Some research on logs could clarify the events triggered after the cluster resize.
Upvotes: 2