GCP Marketplace


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

  • Image type: Only GKE clusters provisioned on Ubuntu Node Images support Portworx. You must specify the Ubuntu node image when you create 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.

  • Permissions: Portworx requires access to the Google Cloud APIs to provision & manage disks. Make sure the user/service account creating the GKE cluster has the following roles:

    • Compute Admin
    • Service Account User
    • Kubernetes Engine Cluster Viewer


Portworx requires permissions to create GCE PDs using the compute APIs. Also, the GCP marketplace requires that the clusters have Read permissions for storage APIs. These permissions can be added to the node pools from the UI when creating the GKE cluster. If using gcloud, type the following command to create a cluster with the correct permissions:

gcloud container clusters create portworx-gke \
    --zone us-east1-b \
    --disk-type=pd-ssd \
    --disk-size=50GB \
    --machine-type=n1-standard-4 \
    --num-nodes=3 \
    --image-type ubuntu \
    --scopes compute-rw,storage-ro

Service Account

The service account associated with your GKE cluster should have permissions to create and mount GCE PDs.

On GCP Marketplace, you have 2 options for installing Portworx.

Option 1: Install Portworx from the marketplace

Before we start installing Portworx, here are a few things you should keep in mind:

  • When installing PX-Enterprise from the GCP Marketplace it will automatically install on all the worker nodes in your GKE cluster.
  • The marketplace installer will also create some Service Accounts to be used by the various components. It is recommended to let the installer create these service accounts instead of choosing pre-existing ones.
  • When installing from the marketplace, the billing agent will automatically report billing information based on the number of nodes to GCP. Please refer to the marketplace listing for the pricing information.

Now, let’s look more closely at how to install PX-Enterprise from the marketplace.

  • First, use the search bar at the top to search for Portworx. You should see something like the following:


  • Select the app and you will see information about it:


  • Next, let’s click configure to go to the configuration page:


Here, you will be required to do a few things: select the Kubernetes cluster and the namespace, type the name of the app, and choose the physical disks you want to provision and attach to each node. Note that these disks will automatically get attached to the nodes on reboots and node failures.

When everything is set, go ahead and click “Deploy”.

  • Now, the installer asks you to confirm that your cluster meets minimum resource requirements. Then, it will proceed with the actual install:


  • Once the installation is finished, we can check the status of our new app:


Option 2: Install Portworx using the CLI

You can also choose to install Portworx using the CLI. You will still need to generate a license key from the GCP portal and create a Kubernetes Secret that can be used to report billing information.

Create Reporting Secret

Navigate to the Portworx listing on the GCP Marketplace and click on Configure. Then, click on the Install via command line tab. Here you can generate a license key to be used for the reporting.

Choose a service account you want to be associated with the billing and click Generate license key. This will download the license key to your system. Apply the license key to your GKE cluster using the following commands:

kubectl apply -n $NS license.yaml
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

Edit the Portworx DaemonSet

Once Portworx has been installed, please edit the portworx DaemonSet with the following:

kubectl edit daemonset -n $NS portworx

And add the following environment variables to the portworx container so that Portworx can read the license generate above

REPORTING_SECRET: Name of the secret generated above
REPORTING_SECRET_NAMESPACE: Namespace where you installed Portworx


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


When an upgrade is available on the marketplace you can install the new version with a new name in the same namespace as the previous install. This will replace all the components for the application with the updated version.

You can remove the old version of the application once all the components in the new version are running.


WARNING: Uninstalling Portworx is a destructive process and you will not be able to recover volumes provisioned by Portworx. Please use this with caution.

You can uninstall Portworx from your GKE cluster by running the following command:

curl -fsL https://install.portworx.com/px-wipe | bash

This will remove all Portworx specific state from the nodes and clean all the disks used by Portworx_

Once the above script completes successfully you can delete the Application object created by GCP.

You can find more information about uninstalling Portworx here.

Last edited: Thursday, Apr 16, 2020