Amy U.
Amy U.

Reputation: 2237

with Google Container Engine, how to create a cluster with more than 3 nodes?

If I start a Google Container Engine cluster like this:

gcloud container clusters --zone=$ZONE create $CLUSTER_NAME

I get three worker nodes. How can I create a cluster with more?

Upvotes: 1

Views: 495

Answers (3)

Vageesha
Vageesha

Reputation: 51

Step 1: Config the zone

gcloud config set compute/zoe us-central1-a

Step 2: config the region

gcloud config set compute /region us-central1

Step 3: create cluster specifying the number of nodes

gcloud container clusters create [$Cluster_name] –num-node=4

Upvotes: 1

shubham_asati
shubham_asati

Reputation: 687

By default gke creates 3 nodes , 1 vCPU and 3.75 GB memory.You will get these specs with this command

gcloud container clusters create cluster_name --zone=zone_name 

but you can specify number of nodes and select the appropriate plan for your cluster with these params

gcloud container clusters create cluster_name --zone=zone_name --num-nodes=no_of_nodes --min-cpu-platform=cpu_platform_name

visit https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform to know more about it.

Upvotes: 0

Amy U.
Amy U.

Reputation: 2237

It's possible to create a different number of worker nodes by using the --num-nodes option when you create the cluster, like this:

gcloud container clusters --zone=$ZONE create $CLUSTER_NAME --num-nodes=5

Upvotes: 9

Related Questions