Install Portworx on-prem using the Operator

This topic provides instructions for installing Portworx with Kubernetes on-prem using the Operator.


Airgapped clusters: If your nodes are airgapped and don’t have access to common internet registries, first follow Airgapped clusters to fetch Portworx images.

Install the Operator

  1. Enter the following kubectl create command to deploy the Operator:

    kubectl create -f

Generate the specs

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

Navigate to PX-Central and log in, or create an account, then follow the process to generate a spec.

NOTE: If you’re using a cloud provider and you use the Customize option when generating your spec, do not add volumes of different types when configuring storage devices during spec generation. For example, do not add both GP2 and GP3 for AWS, standard and ssd for GCP, or Standard and Premium for Azure. This can cause performance issues and errors.

Deploy the Operator

To deploy the Operator, run the command that PX-Central provided, which looks similar to the following:

kubectl apply -f '<portworx_version>?comp=pxoperator&kbver=<k8s-version>&ns=portworx'
serviceaccount/portworx-operator created
podsecuritypolicy.policy/px-operator created created created
deployment.apps/portworx-operator created

Deploy the StorageCluster

To deploy the StorageCluster, run the command that PX-Central provided, which looks similar to the following:

kubectl apply -f “<portworx_version>?operator=true&mc=false&kbver=1.25.0&ns=portworx&b=true&kd=type%3Dgp3%2Csize%3D150&s=%22type%3Dgp3%2Csize%3D150%22&c=px-cluster-0584f7f1-b6be-4608-800c-2ac5fb8069e0&stork=true&csi=true&mon=true&tel=false&st=k8s&promop=true'

Apply the specs

Apply the generated specs to your cluster.

kubectl apply -f px-spec.yaml

Monitor the Portworx nodes

  1. Enter the following kubectl get command and wait until all Portworx nodes show as ready in the output:

    kubectl -n kube-system get storagenodes -l name=portworx
  2. Enter the following kubectl describe command with the name of one of the Portworx nodes to show the current installation status for individual nodes:

    kubectl -n kube-system describe storagenode <portworx-node-name>
    Type     Reason                             Age                     From                  Message
    ----     ------                             ----                    ----                  -------
    Normal   PortworxMonitorImagePullInPrgress  7m48s                   portworx, k8s-node-2  Portworx image portworx/px-enterprise:2.5.0 pull and extraction in progress
    Warning  NodeStateChange                    5m26s                   portworx, k8s-node-2  Node is not in quorum. Waiting to connect to peer nodes on port 9002.
    Normal   NodeStartSuccess                   5m7s                    portworx, k8s-node-2  PX is ready on this node
    NOTE: In your output, the image pulled will differ based on your chosen Portworx license type and version.


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

Last edited: Tuesday, May 9, 2023