Incorrect number of nodes created in GKE

1/2/2020

I entered the below command to create a cluster, but I get an error stating gcloud container clusters create kubia --num-nodes=3 --machine-type=f1-micro

The above command throws the below error.

ERROR: (gcloud.container.clusters.create) ResponseError: code=403, message=Insufficient regional quota to satisfy request: resource "IN_USE_ADDRESSES": request requires '9.0' and is short '1.0'. project has a quota of '8.0' with '8.0' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=k8s-demo-263903.

Then I chose to set the number of nodes to 2

The command created 6 nodes

NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS kubia asia-south1 1.13.11-gke.14 35.200.140.153 f1-micro 1.13.11-gke.14 6 RUNNING

NAME

gke-kubia-default-pool-46a198b9-qdg2
gke-kubia-default-pool-46a198b9-s3xn
gke-kubia-default-pool-72fd11ff-mddd
gke-kubia-default-pool-72fd11ff-qrds
gke-kubia-default-pool-75ecb3b2-1wfq
gke-kubia-default-pool-75ecb3b2-j4cz

Why is that the number of node is getting multiplied with 3 for the nodes mentioned in the command?

-- zilcuanu
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

1/2/2020

By default, a cluster and his nodes run in a single compute zone that you specify when you create the cluster, by adding regional clusters you will increase the availability of both master cluster and his nodes by replication them across multiple zones of a region.

Why is that the number of node is getting multiplied with 3 for the nodes mentioned in the command?

There are some limitations regarding this, like in case you have Additional Zones selected the clusters will consume nine IP addresses.

You should try to reduce the number of nodes down to one per zone, if that is why you desire.

ERROR: (gcloud.container.clusters.create) ResponseError: code=403, message=Insufficient regional quota to satisfy request: resource "IN_USE_ADDRESSES": request requires '9.0' and is short '1.0'. project has a quota of '8.0' with '8.0' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=k8s-demo-263903.

In case of this error, since I suppose you have a newly created Google Cloud account you are granted only eight IP addresses per region, so what you may need is to request an increase in your quota for regional in-use IP addresses, depending on the size of your regional cluster.

Basically, the error you got is because you had too few available.

If you do not want to multiple it just reduce the number of zones.

-- Stefan Neacsu
Source: StackOverflow