Skip to main content
Version: 3.1

Install Portworx on Elastic Kubernetes Service and EKS-D

This topic explains how to install Portworx on Amazon Web Services (AWS) Elastic Kubernetes Service (EKS) and EKS-D.


  • An AWS EKS cluster that meets the Portworx prerequisites
  • You must have the supported disk types
  • Recommended disk sizes:
    • GP2: 150 (GB) size disk is needed as the minimum IOP require.
    • GP3 specify IOPS required from EBS volume and specify throughput for EBS volume
    • IO1 specify IOPS required from EBS volume
  • For production environments Portworx by Pure Storage recommends 3 Availability Zones (AZs)
  • Portworx by Pure Storage recommends you set Max storage nodes per availability zone, Portworx will ensure that many storage nodes exist in the zone
  • You can follow the same procedures explained in this topic to deploy Portworx on AWS Outposts.
  • You can also follow the steps in this topic to install Portworx on EKS-D.
  • For details on GP2, GP3, and IO1 performance characteristics, refer to the AWS documentation.

Create an IAM policy

Provide the permissions for all the instances in the autoscaling cluster by creating an IAM role.

Perform the following steps on your AWS Console:

  1. Navigate to the IAM page on your AWS console, then select Policies under the Identity and Access Management (IAM) sidebar section, then select the Create Policy button in the upper right corner:

    AWS create policy page

  2. Choose the JSON tab, then paste the following permissions into the editor, providing your own value for Sid if applicable. You can either use the minimum permissions required or use the permissions required for disk encryption:


    These are the minimum permissions needed for storage operations for a Portworx cluster. For complete permissions required for all of Portworx storage operations, see the credentials reference.

    "Version": "2012-10-17",
    "Statement": [
    "Sid": "",
    "Effect": "Allow",
    "Action": [
    "Resource": ["*"]
  3. Name and create the policy.

    Create policy

Attach IAM policy

Attach the above created policy to your Node instance role or user account.

Follow the instructions below for attaching the policy with your NodeInstanceRole:

  1. From the IAM page, click Roles in the left pane.

  2. On the Roles page, search for and select your nodegroup NodeInstanceRole using your cluster name. The following example shows eksctl-victorpeksdemo2-nodegroup-NodeInstanceRole-M9QTT58HQ9ZX as the nodegroup Instance Role:

    Search for your policy


    If there are more than one nodegroup NodeInstanceRole for your cluster, attach the policy to those NodeInstanceRoles as well.

  3. Attach the previously created policy by selecting Attach policies from the Add permissions dropdown on the right side of the screen:

    Attach your policy

  4. Under Other permissions policies, search for your policy name. Select your policy name and select the Attach policies button to attach it.

    The policy you attached will appear under Permissions policies if successful:

    Confirm your policy is added

Install Portworx

Get your K3s version

Run this command to get the K3s version installed on your Rancher cluster for use in the later section:

(kubectl version --short 2>&1 || kubectl version) | awk -Fv '/Server Version: / {print $3}'

Generate specs

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

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

  2. Select Portworx Enterprise from the product catalog and click Continue.

  3. On the Product Line page, choose any option depending on which license you intend to use, then select Continue to start the spec generator.

  4. For Platform, select your K8s AWS as your cloud environment.

  5. For Distribution Name, select Elastic Kubernetes Service (EKS).

  6. In the K8s Version field, enter the complete K3s version string that you retrieved in the previous section and click Save Spec to generate the specs.

  7. You may customize the storage and network for your portworx cluster if needed, by clicking on Customize.


As the PX-StoreV2 option is set to Auto, the Operator performs a pre-flight check across the cluster to determine if your cluster is capable of deploying Portworx with the PX-StoreV2 datastore. If the pre-flight check passes for each node, then PX-StoreV2 will be automatically selected as your default datastore during Portworx installation.

Apply specs

Apply the Operator and StorageCluster specs you generated in the section above using the kubectl apply command:

  1. Deploy the Operator:

    kubectl apply -f '<version-number>?comp=pxoperator'
    serviceaccount/portworx-operator created
    podsecuritypolicy.policy/px-operator created created created
    deployment.apps/portworx-operator created
  2. Deploy the StorageCluster:

    kubectl apply -f '<version-number>?operator=true&mc=false&kbver=&b=true&kd=type%3Dgp2%2Csize%3D150&s=%22type%3Dgp2%2Csize%3D150%22&c=px-cluster-XXXX-XXXX&eks=true&stork=true&csi=true&mon=true&tel=false&st=k8s&e==AWS_ACCESS_KEY_ID%3XXXX%2CAWS_SECRET_ACCESS_KEY%3XXXX&promop=true' created

Monitor Portworx nodes

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

    kubectl -n <px-namespace> get storagenodes -l name=portworx
    NAME                 ID                                     STATUS   VERSION          AGE
    username-k8s1-node0 7652208b-0bdf-4222-ac83-43cf085e764e Online 2.11.1-3a5f406 4m52s
    username-k8s1-node1 d43b7ddb-9f2f-4dde-81ff-4597de6fdd32 Online 2.11.1-3a5f406 4m52s
    username-k8s1-node2 0eda7c8b-3f6b-4ce2-b393-e2169ffa111c Online 2.11.1-3a5f406 4m52s
  2. Enter the following kubectl describe command with the NAME of one of the Portworx nodes you retrieved above to show the current installation status for individual nodes:

    kubectl -n <px-namespace> describe storagenode <portworx-node-name>
    Type Reason Age From Message
    ---- ------ ---- ---- -------
    Normal PortworxMonitorImagePullInPrgress 7m48s portworx, k8s-node-2 Portworx image portworx/px-enterprise: 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
    • In your output, the image pulled will differ based on your chosen Portworx license type and version.
    • For Portworx Enterprise, the default license activated on the cluster is a 30 day trial that you can convert to a SaaS-based model or a generic fixed license.
    • For Portworx Essentials, your cluster must have internet connectivity so that it can send usage information every 24 hours to renew the license on the cluster. You can convert an Essentials license to either a fixed license or SaaS-based license.

Verify your Portworx installation Once you've installed Portworx, you can perform the following tasks to verify that Portworx has installed correctly.

Verify if all pods are running Enter the following kubectl get pods command to list and filter the results for Portworx pods:

kubectl get pods -n <px-namespace> -o wide | grep -e portworx -e px
portworx-api-774c2                                      1/1     Running   0                2m55s   username-k8s1-node0    <none>           <none>
portworx-api-t4lf9 1/1 Running 0 2m55s username-k8s1-node1 <none> <none>
portworx-api-dvw64 1/1 Running 0 2m55s username-k8s1-node2 <none> <none>
portworx-kvdb-94bpk 1/1 Running 0 4s username-k8s1-node0 <none> <none>
portworx-kvdb-8b67l 1/1 Running 0 10s username-k8s1-node1 <none> <none>
portworx-kvdb-fj72p 1/1 Running 0 30s username-k8s1-node2 <none> <none>
portworx-operator-58967ddd6d-kmz6c 1/1 Running 0 4m1s username-k8s1-node0 <none> <none>
prometheus-px-prometheus-0 2/2 Running 0 2m41s username-k8s1-node0 <none> <none>
px-cluster-1c3edc42-4541-48fc-b173-3e9bf3cd834d-9gs79 2/2 Running 0 2m55s username-k8s1-node0 <none> <none>
px-cluster-1c3edc42-4541-48fc-b173-3e9bf3cd834d-vpptx 2/2 Running 0 2m55s username-k8s1-node1 <none> <none>
px-cluster-1c3edc42-4541-48fc-b173-3e9bf3cd834d-bxmpn 2/2 Running 0 2m55s username-k8s1-node2 <none> <none>
px-csi-ext-868fcb9fc6-54bmc 4/4 Running 0 3m5s username-k8s1-node0 <none> <none>
px-csi-ext-868fcb9fc6-8tk79 4/4 Running 0 3m5s username-k8s1-node2 <none> <none>
px-csi-ext-868fcb9fc6-vbqzk 4/4 Running 0 3m5s username-k8s1-node1 <none> <none>
px-prometheus-operator-59b98b5897-9nwfv 1/1 Running 0 3m3s username-k8s1-node0 <none> <none>

Note the name of one of your px-cluster pods. You'll run pxctl commands from these pods in following steps.

Verify Portworx cluster status You can find the status of the Portworx cluster by running pxctl status commands from a pod. Enter the following kubectl exec command, specifying the pod name you retrieved in the previous section:

kubectl exec <pod-name> -n <px-namespace> -- /opt/pwx/bin/pxctl status
Defaulted container "portworx" out of: portworx, csi-node-driver-registrar
Status: PX is operational
Telemetry: Disabled or Unhealthy
Metering: Disabled or Unhealthy
License: Trial (expires in 31 days)
Node ID: 788bf810-57c4-4df1-9a5a-70c31d0f478e
Local Storage Pool: 1 pool
0 HIGH raid0 3.0 TiB 10 GiB Online default default
Local Storage Devices: 3 devices
Device Path Media Type Size Last-Scan
0:1 /dev/vdb STORAGE_MEDIUM_MAGNETIC 1.0 TiB 14 Jul 22 22:03 UTC
0:2 /dev/vdc STORAGE_MEDIUM_MAGNETIC 1.0 TiB 14 Jul 22 22:03 UTC
0:3 /dev/vdd STORAGE_MEDIUM_MAGNETIC 1.0 TiB 14 Jul 22 22:03 UTC
* Internal kvdb on this node is sharing this storage device /dev/vdc to store its data.
total - 3.0 TiB
Cache Devices:
* No cache devices
Cluster Summary
Cluster ID: px-cluster-1c3edc42-4541-48fc-b173-3e9bf3cd834d
Cluster UUID: 33a82fe9-d93b-435b-943e-6f3fd5522eae
Scheduler: kubernetes
Nodes: 3 node(s) with storage (3 online)
IP ID SchedulerNodeName Auth StorageNode Used Capacity Status StorageStatus Version Kernel OS f6d87392-81f4-459a-b3d4-fad8c65b8edc username-k8s1-node0 Disabled Yes 10 GiB 3.0 TiB Online Up 2.11.0-81faacc 3.10.0-1127.el7.x86_64 CentOS Linux 7 (Core) 788bf810-57c4-4df1-9a5a-70c31d0f478e username-k8s1-node1 Disabled Yes 10 GiB 3.0 TiB Online Up (This node) 2.11.0-81faacc 3.10.0-1127.el7.x86_64 CentOS Linux 7 (Core) a8c76018-43d7-4a58-3d7b-19d45b4c541a username-k8s1-node2 Disabled Yes 10 GiB 3.0 TiB Online Up 2.11.0-81faacc 3.10.0-1127.el7.x86_64 CentOS Linux 7 (Core)
Global Storage Pool
Total Used : 30 GiB
Total Capacity : 9.0 TiB

Create your first PVC

For your apps to use persistent volumes powered by Portworx, you must use a StorageClass that references Portworx as the provisioner. Portworx includes a number of default StorageClasses, which you can reference with PersistentVolumeClaims (PVCs) you create. For a more general overview of how storage works within Kubernetes, refer to the Persistent Volumes section of the Kubernetes documentation.

Perform the following steps to create a PVC:

  1. Create a PVC referencing the px-csi-db default StorageClass and save the file:
kind: PersistentVolumeClaim
apiVersion: v1
name: px-check-pvc
storageClassName: px-csi-db
- ReadWriteOnce
storage: 2Gi
  1. Run the kubectl apply command to create a PVC:
kubectl apply -f <your-pvc-name>.yaml
persistentvolumeclaim/example-pvc created

Verify your StorageClass and PVC

  1. Enter the kubectl get storageclass command:
kubectl get storageclass
px-csi-db Delete Immediate true 43d
px-csi-db-cloud-snapshot Delete Immediate true 43d
px-csi-db-cloud-snapshot-encrypted Delete Immediate true 43d
px-csi-db-encrypted Delete Immediate true 43d
px-csi-db-local-snapshot Delete Immediate true 43d
px-csi-db-local-snapshot-encrypted Delete Immediate true 43d
px-csi-replicated Delete Immediate true 43d
px-csi-replicated-encrypted Delete Immediate true 43d
px-db Delete Immediate true 43d
px-db-cloud-snapshot Delete Immediate true 43d
px-db-cloud-snapshot-encrypted Delete Immediate true 43d
px-db-encrypted Delete Immediate true 43d
px-db-local-snapshot Delete Immediate true 43d
px-db-local-snapshot-encrypted Delete Immediate true 43d
px-replicated Delete Immediate true 43d
px-replicated-encrypted Delete Immediate true 43d
stork-snapshot-sc stork-snapshot Delete Immediate true 43d

kubectl returns details about the StorageClasses available to you. Verify that px-csi-db appears in the list.

  1. Enter the kubectl get pvc command. If this is the only StorageClass and PVC that you've created, you should see only one entry in the output:
kubectl get pvc <your-pvc-name>
NAME          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS           AGE
example-pvc Bound pvc-dce346e8-ff02-4dfb-935c-2377767c8ce0 2Gi RWO example-storageclass 3m7s

kubectl returns details about your PVC if it was created correctly. Verify that the configuration details appear as you intended.

Was this page helpful?