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?
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.