Skip to main content
Version: 3.1

configure gcloud shared content

Create your GKE cluster using gcloud

To create a 3-node regional in us-east1 cluster with auto-scaling enabled, run:

gcloud container clusters create px-demo \
--region us-east1 \
--node-locations us-east1-b,us-east1-c,us-east1-d \
--disk-type=pd-ssd \
--disk-size=128GB \
--labels=portworx=gke \
--machine-type=n1-highcpu-8 \
--num-nodes=3 \
--image-type ubuntu \
--scopes compute-rw,storage-ro \
--enable-autoscaling --max-nodes=6 --min-nodes=3

Set your default cluster

After the above command completes, let’s check that everything is properly set up and make this cluster the default cluster while using gcloud:

gcloud config set container/cluster px-demo
gcloud container clusters get-credentials --region <region-name> px-demo

Next, we need to open access to the Compute API. Run the following command:

gcloud services enable compute.googleapis.com

Provide permissions to Portworx

Portworx requires a ClusterRoleBinding for your user to deploy the specs. You can do this using:

kubectl create clusterrolebinding myname-cluster-admin-binding \
--clusterrole=cluster-admin --user=`gcloud info --format='value(config.account)'`
Was this page helpful?