Install Portworx on Red Hat OpenShift Service on AWS (ROSA) with hosted control planes (HCP)
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.
Portworx storage is a built-for-Kubernetes service that offers flexible and scalable persistent storage for applications in production. In this tutorial we will look at installing Portworx Enterprise on ROSA-HCP.
Prerequisites
You must have a Red Hat OpenShift Service on AWS (ROSA) with hosted control plane cluster
Set environment variable adjusting for ROSA_HCP_CLUSTER_NAME and REGION as necessary
Open ports for worker nodes via Web console (Note to use cli skip this step)
Perform the following to add the inbound rules so that the AWS EC2 instance uses your specified security groups to control the incoming traffic.
- From the EC2 page of your AWS console find EC2 instances for hcp cluster worker nodes, click Security Groups, under Network & Security, in the left pane.

On the Security Groups page, type your ROSA cluster name in the search bar and press enter. You will see a list of security groups associated with your cluster. Click the link under Security group ID of your cluster’s worker security group:
From your security group page, click Actions in the upper-right corner, and choose Edit inbound rules from the dropdown menu.
Click Add Rule at the bottom of the screen to add each of the following rules:
- Allow inbound Custom TCP traffic with Protocol: TCP on ports 17001 - 17022
- Allow inbound Custom TCP traffic with Protocol: TCP on port 20048
- Allow inbound Custom TCP traffic with Protocol: TCP on port 111
- Allow inbound Custom UDP traffic with Protocol: UDP on port 17002
- Allow inbound NFS traffic with Protocol: TCP on port 2049
Make sure to specify the security group ID of the same worker security group that is mentioned in step 2.
- Click Save rule.
Open ports for worker nodes via aws and rosa cli
- Get a Private Subnet ID from the cluster.
- Get the VPC ID from the subnet ID.
- Get the cluster ID
- Get Security group id associated with VPC
- Add inbound rules to default Security group id for
Log in to OpenShift UI
Log in to the OpenShift console by following the quick access instructions on the Accessing your cluster quickly page in the Red Hat OpenShift Service on AWS documentation.
- Create
portworxnamespace
Output
- Get AWS credentials for AWS IAM user (replace
with user ) and copy AccessKeyId and SecretAccessKey
- Create secret in portworx namespace in ROSA-HCP cluster (get aws credentials from step2)
Install Portworx Operator using the OpenShift UI
From your OpenShift console, select OperatorHub in the left pane.
On the OperatorHub page, search for Portworx and select the Portworx Enterprise or Portworx Essential card:

- Install

The Portworx Operator begins to install and takes you to the Install Operator page. On this page, select the A specific namespace on the cluster option for Installation mode. Select
portworxnamespaceClick Install to install Portworx Operator in the
portworxnamespace.
Apply Portworx spec using OpenShift UI
- Once the Operator is installed successfully, create a StorageCluster object from the same page by clicking Create StorageCluster:

- On the Create StorageCluster page, choose YAML view to configure a StorageCluster. Copy and paste the below Portworx spec into the text-editor, and click Create to deploy Portworx:
Note: One can generate Portworx spec from Portworx Central using the instructions

- Verify that Portworx has deployed successfully by navigating to the Storage Cluster tab of the Installed Operators page. Once Portworx has been fully deployed, the status will show as Running:

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 oc get pods command to list and filter the results for Portworx pods:
Output
Note the name of one of your px-cluster pods. You’ll run pxctl commands from these pods in following steps.
Output
The Portworx status will display PX is operational if your cluster is running as intended.
Verify pxctl cluster provision status
1.Find the storage cluster, the status should show as Online:
Output
- Find the storage nodes status should show Online
Output
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:
- Create a PVC referencing the px-csi-db default StorageClass and save the file:
Output
- Verify your StorageClass and PVC
Output
- To get PVC you should
Output