Install PX-CSI
After preparing your environment, deploy the Portworx Operator first, followed by the PX-CSI StorageCluster. The Portworx Operator automates the deployment, configuration, upgrades, and integration of PX-CSI with your Kubernetes cluster.
Follow the steps on this page to generate and deploy the Kubernetes manifests from Portworx Central.
Prerequisites
- Ensure that system requirements are met.
- Ensure your Kubernetes cluster is configured according to the backend storage you plan to use. Refer to the following pages for detailed instructions:
Generate Kubernetes manifest
To generate Kubernetes manifests for PX-CSI installation, follow these steps:
-
Navigate to Portworx Central and log in or create an account.
-
In the left sidebar, select Spec List.
-
On the Spec List page, click Create New Spec, then choose PX-CSI.
-
On the Generate PX-CSI Spec page, configure the Essential Details:
-
PX-CSI Version: Select the version you want to install.
-
Distribution Name: Select your Kubernetes platform.
importantFor a Vanilla Kubernetes cluster or Everpure Cloud Dedicated (PSC Dedicated), select None.
-
K8s Version: Provide your Kubernetes version. You can find your version using the following command:
(kubectl version --short 2>&1 || kubectl version) | awk -Fv '/Server Version: / {print $3}' -
Namespace: Provide an existing namespace where you plan to install PX-CSI.
-
Cluster Name Prefix: Specify the prefix for the Portworx cluster name. The Spec Generator adds a UUID to the specified name to ensure a unique cluster name.
-
Access Type: Select the type of storage access you need:
- Block Storage: For FlashArray block volumes
- File Storage: For FlashArray File Services or FlashBlade
- Both: For environments using both block and file storage
-
Storage Area Network Type: Select the protocol for block volume attachment. This field is only applicable when Access Type is set to Block Storage or Both. By default, iSCSI is selected.
-
Telemetry: Enable or disable telemetry. For more information, see Telemetry to Pure1.
-
Install Prometheus: Choose whether to install Prometheus for monitoring PX-CSI. For more information, see Monitor PX-CSI with Prometheus.
-
Fusion Controller (Early Access): Enable or disable the Fusion Controller feature. Portworx Fusion Controller is a unified, application-aware controller that combines Everpure Fusion fleet-level management with Portworx Kubernetes-native data services. For more information, see Portworx Fusion Controller documentation.
-
-
(Optional) Use Advanced Settings section to configure additional options:
-
Environment Variables: Add environment variables in name:value pairs. Common examples:
-
Multiple iSCSI interfaces: If you are using multiple iSCSI interfaces, add the environment variable
PURE_ISCSI_ALLOWED_IFACESwith comma-separated interface names. Example:"iface_name_1,iface_name_2".noteIf your virtual machine has multiple iSCSI interfaces, PX-CSI cannot determine which interface to use. You must specify the iSCSI interface list using the
PURE_ISCSI_ALLOWED_IFACESenvironment variable.However, setting this variable alone does not add the interfaces to the iSCSI database. You must also manually add each interface using the following commands:
sudo iscsiadm -m iface -I <iface_name> -o new
sudo iscsiadm -m iface -I <iface_name> -o update -n iface.net_ifacename -v <your_iscsi_interface>Repeat these commands for each interface you specify in the environment variable.
-
Subnet-aware iSCSI login: If your environment has multiple subnets with network policies that restrict cross-subnet communication, set the
ENABLE_SUBNET_AWARE_ISCSI_LOGINenvironment variable to"true". This restricts iSCSI initiator interfaces to communicate only with FlashArray target interfaces within the same subnet. For more information, see Configure subnet-aware iSCSI login.noteYou can also configure these environment variables after installation by editing the
StorageClusterresource.
-
-
Use Custom Registry: Enable this option if you are using a custom container registry.
-
Image Repository Location: Specify a custom container registry server (including repository) that will be used instead of
index.docker.ioto download Docker images. Example:myregistry.com/myrepository/ -
Registry Secret: Specify a custom Kubernetes secret that will serve as authentication for a container registry. The secret should exist within the same namespace as the StorageCluster object. This step is required only if you are utilizing a secure registry.
-
Image Pull Policy: Define an image update policy.
Alwayswill always attempt to fetch the latest image from the registry.IfNotPresentwill skip pulling if image already exists.Neveruses only images already in docker. Example:Always
-
-
-
Click Save and Download to generate the specification.
(Optional) Enable CSI topology feature
If you want to use CSI topology feature, follow the steps below to enable CSI topology:
-
Ensure that you have prepared your environment for using CSI topology.
-
Set
spec.csi.topology.enabledparameter totruein the StorageCluster specification.csi:
enabled: true
topology:
enabled: true
Apply Kubernetes manifest
Deploy the Operator and StorageCluster specification you generated in the section above:
- If you used Portworx Central to generate the StorageCluster manifest:
- If you downloaded the specification and made changes to it, use that file with the
kubectl applycommand below instead of the specification URL generated by Portworx Central. - On the Google Anthos platform, download the ZIP file containing the Operator and StorageCluster specifications generated in the Generate Kubernetes manifest section. Unzip the file and use the included filenames with the
kubectl applycommand.
- If you downloaded the specification and made changes to it, use that file with the
- If you created the StorageCluster manifest manually, add the
PURE_FLASHARRAY_SAN_TYPEenvironment variable in theStorageClusterspecification to configure FlashArray as the backend storage. Multipath checks are performed only if this environment variable is included. This variable is not required if you are using only FlashBlade as the backend storage.
- OpenShift Container Platform
- Other Kubernetes platforms
-
Deploy the Portworx Operator:
- OCP version 4.20 or later:
From the OpenShift UI, go to Ecosystem > Software Catalog, search for Portworx Operator, and select Install to deploy the Portworx Operator in a desired namespace. - OCP version 4.19 or earlier:
From the OpenShift UI, go to OperatorHub, search for Portworx Operator, and select Install to deploy the Portworx Operator in a desired namespace.
- OCP version 4.20 or later:
-
Deploy the StorageCluster:
oc apply -f '<url-generated-from-portworx-central-spec-gen>'storagecluster.core.libopenstorage.org/px-cluster-xxxxxxxx-xxxx-xxxx-xxxx-5db83030471e created
-
Deploy the Operator:
kubectl apply -f '<url-generated-from-portworx-central-spec-gen>'serviceaccount/portworx-operator created
podsecuritypolicy.policy/px-operator created
clusterrole.rbac.authorization.k8s.io/portworx-operator created
clusterrolebinding.rbac.authorization.k8s.io/portworx-operator created
deployment.apps/portworx-operator created -
Deploy the StorageCluster:
kubectl apply -f '<url-generated-from-portworx-central-spec-gen>'storagecluster.core.libopenstorage.org/px-cluster-xxxxxxxx-xxxx-xxxx-xxxx-5db83030471e created
After deployment, PX-CSI automatically discovers any configured FlashArray or FlashBlade credentials and uses them to provision backend storage.
Verify Portworx installation
After installing PX-CSI, verify the status of the Portworx cluster and pods to ensure everything is running correctly.
- OpenShift Container Platform
- Other Kubernetes platforms
- Verify that all Portworx pods are running.
oc get pods -n <portworx> -o wide | grep -e portworx -e px - Verify the status of the Portworx cluster provision.
oc get stc -n <portworx>
- Verify that all Portworx pods are running.
kubectl get pods -n portworx - Verify the status of the Portworx cluster provision.
kubectl get stc -n <portworx>
Note: PX-CSI automatically deploys a set of default
StorageClassresources during installation. You can view them usingkubectl get sc. You can use these defaultStorageClassresources or create a custom one by following the steps in Dynamic Provisioning of Volumes.
If you have installed PX-CSI to use Everpure Cloud Dedicated, storage operations such as creating or resizing a PVC and taking snapshots are the same as on FlashArray. Refer to the relevant FlashArray sections in this documentation for guidance on performing these tasks.