What's the correct parameter to resize a cluster? [GCP]

6/20/2019

I have a cluster in GCP that I want to resize using the console command. I was looking at the documentation when I've realized that it's possible to resize the cluster with:

gcloud container clusters resize [CLUSTER_NAME] --node-pool [NODE_POOL] --num-nodes [NUM_NODES] --region=$REGION

and either

gcloud container clusters resize [CLUSTER_NAME] --node-pool [NODE_POOL] --size [NUM_NODES] --region=$REGION 

I have tried and seems like both work properly but is there any difference? which is better?

enter image description here

-- Juan Bravo Roig
google-cloud-platform
google-kubernetes-engine

1 Answer

6/20/2019

These commands are actually identical and have the same effect. The original --size flag was renamed --num-nodes since it's more self-explanatory. This was introduced in version 242.0.0 and is documented in the Cloud SDK release notes:

Renamed --size flag of gcloud container clusters resize to --num-nodes. --size retained as an alias.

-- LundinCast
Source: StackOverflow