This document shows how to install Portworx with Google Kubernetes Engine (GKE).


Before installing Portworx-Enterprise, make sure your environment meets the following requirements:

  • Image type: Portworx is supported on GKE clusters provisioned on Ubuntu Node Images. So it is important to specify the node image as Ubuntu when creating clusters.

  • Resource requirements: Portworx requires that each node in the Kubernetes cluster has at least 4 CPUs and 4 GB memory for Portworx. It is important to keep this in mind when selecting the machine types during cluster creation.

  • Compute Admin and Service Account User Roles: These roles provides Portworx access to the Google Cloud Storage APIs to provision persistent disks. Make sure the user creating the GKE cluster has these roles.

Create a GKE cluster

Configure gcloud

If this is your first time running with Google Cloud, please follow the steps below to install the gcloud shell, configure your project and compute zone. If you already have gcloud set up, you can skip to the next section.

gcloud config set project $PROJECT_NAME
gcloud config set compute/region us-east1
gcloud config set compute/zone us-east1-b
sudo gcloud components update

Create your GKE cluster using gcloud

You have 2 options for the type of cluster you create: Regional or Zonal. Check out this link to find out more about regional clusters.

Create a zonal cluster

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

gcloud container clusters create px-demo \
    --zone us-east1-b \
    --disk-type=pd-ssd \
    --disk-size=50GB \
    --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

Create a regional cluster

If you want to create a 3-node regional in us-east1 cluster with auto-scaling enabled, type:

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=50GB \
     --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 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)'`


Portworx gets its storage capacity from the block storage mounted in the nodes and aggregates the capacity across all the nodes. This way, it creates a global storage pool. In our example, Portworx uses Persistent Disks (PD) as that block storage, where Portworx adds PDs automatically as the Kubernetes scales-out and removes PDs as nodes exit the cluster or get replaced.

Generate the specs

To install Portworx with Kubernetes, you must first generate Kubernetes manifests that you will deploy in your cluster:

  1. Navigate to PX-Central and log in, or create an account
  2. Select Install and Run to open the Spec Generator

    Screenshot showing install and run

  3. Select New Spec

    Screenshot showing new spec button

Portworx can also be installed using it’s Helm chart by following instructions here. The above method is recommended over helm as the wizard will guide you based on your environment.

Apply the specs

Apply the generated specs to your cluster.

kubectl apply -f px-spec.yaml
Monitor the portworx pods

Wait till all Portworx pods show as ready in the below output:

kubectl get pods -o wide -n kube-system -l name=portworx
Monitor Portworx cluster status
PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status


Once you have a running Portworx installation, below sections are useful.

Last edited: Wednesday, Apr 8, 2020