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 Install and Run.
-
On the Spec List page, click Create New Spec, then choose PX-CSI.
-
On the Generate PX-CSI Spec page, review the options and select the appropriate values based on your requirements.
important- By default, iSCSI is set as your protocol for data transfer. To change this, use the Storage Area Network dropdown.
- For a Vanilla Kubernetes cluster or Pure Cloud Block Store (CBS), select the Distribution Name option as None.
-
(Optional) If you are using multiple NICs for the iSCSI host, add the environment variable
PURE_ISCSI_ALLOWED_IFACES
with comma-separated names of NICs in Advanced Settings. Example:"eth1,eth2"
.noteIf your virtual machine has multiple NICs, Portworx cannot determine which NIC to use to communicate with FlashArray. You must specify the NIC list using the
PURE_ISCSI_ALLOWED_IFACES
environment 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 command:
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 this command for each interface you specify in the environment variable.
-
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.enabled
parameter totrue
in 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 have downloaded and modified the specification, use that in the
kubectl apply
command below, instead of the specification URL generated from Portworx Central. - For the Google Anthos platform, download the ZIP file containing the Operator and StorageCluster specs generated in the Generate Kubernetes manifest section. Unzip the file and use the filenames in the
kubectl apply
command.
- Kubernetes
- OpenShift
-
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
-
From the OpenShift UI, go to OperatorHub, search for Portworx Enterprise, and click Install to deploy the Portworx Operator in a desired namespace.
-
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
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.
- Kubernetes
- OpenShift
- 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>
- 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>
Note: PX-CSI automatically deploys a set of default
StorageClass
resources during installation. You can view them usingkubectl get sc
. You can use these defaultStorageClass
resources or create a custom one by following the steps in Dynamic Provisioning of Volumes.
If you have installed PX-CSI to use Pure Cloud Block Store, 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.