Upgrade PX-CSI
This page provides instructions for upgrading PX-CSI to the latest version. The upgrade process consists of two steps:
- Upgrade the Portworx Operator - Update the Operator to the latest version to ensure compatibility with the new PX-CSI version.
- Upgrade the StorageCluster - Update the PX-CSI image version based on your current version.
The pxctl CLI is removed starting in PX-CSI 25.8.0. Use kubectl, oc, or apply YAML manifests to manage CustomResource objects.
Upgrade the Portworx Operator
Upgrade the Portworx Operator to the latest version before upgrading the StorageCluster. This step is required for both upgrade paths.
- OpenShift Container Platform
- Other Kubernetes platforms
Upgrade the Portworx Operator using the OpenShift web console:
- OCP version 4.20 or later:
From the OpenShift UI, go to Ecosystem > Software Catalog, search for Portworx Operator, and upgrade the operator to the latest version. - OCP version 4.19 or earlier:
From the OpenShift UI, go to OperatorHub, search for Portworx Operator, and upgrade the operator to the latest version.
For detailed instructions, see Red Hat documentation on updating installed operators.
-
Check the current Portworx Operator version:
kubectl get deployment -n <portworx> portworx-operator -o=jsonpath='{.spec.template.spec.containers[0].image}' -
Edit the Operator deployment:
kubectl edit deployment -n <portworx> portworx-operatorUpdate the image to use the latest version:
containers:
- name: portworx-operator
image: portworx/px-operator:<latest-version> -
Verify the rollout status:
kubectl rollout status deployment/portworx-operator -n <portworx>
Upgrade the StorageCluster
Choose the upgrade procedure based on your current PX-CSI version:
Upgrade from 25.8.0 or later
If you are running PX-CSI 25.8.0 or later, upgrade to the latest version by updating the image version in your StorageCluster resource. The Portworx Operator manages the upgrade automatically.
Prerequisites
Before upgrading, ensure the following requirements are met:
-
Your Kubernetes cluster meets the system requirements.
-
All PX-CSI pods are in a
Runningstate:kubectl get pods -n <portworx>
Update the StorageCluster image version
- OpenShift Container Platform
- Other Kubernetes platforms
-
Retrieve the name of your Portworx
StorageCluster:oc get storagecluster -n <portworx>NAME CLUSTER UUID STATUS VERSION AGE
px-cluster-test *****-****-****-**** Running 25.8.1 4d -
Edit the
StorageClusterresource to update the image version:oc edit storagecluster -n <portworx> <px-cluster-test>Find the
spec.imagefield:apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: px-cluster-test
namespace: <portworx>
spec:
image: portworx/px-pure-csi-driver:25.8.1Update the image version to the desired version (for example,
26.1.0):spec:
image: portworx/px-pure-csi-driver:26.1.0 -
Save the changes and verify the upgrade:
oc get pods -n <portworx>
oc get storagecluster -n <portworx>noteYou can check the upgrade status of nodes at any time by running
oc get storagenodes -A, which shows which nodes have been upgraded and the node currently being upgraded.
-
Retrieve the name of your Portworx
StorageCluster:kubectl get storagecluster -n <portworx>NAME CLUSTER UUID STATUS VERSION AGE
px-cluster-test *****-****-****-**** Running 25.8.1 4d -
Edit the
StorageClusterresource to update the image version:kubectl edit storagecluster -n <portworx> <px-cluster-test>Find the
spec.imagefield:apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: px-cluster-test
namespace: <portworx>
spec:
image: portworx/px-pure-csi-driver:25.8.1Update the image version to the desired version (for example,
26.1.0):spec:
image: portworx/px-pure-csi-driver:26.1.0 -
Save the changes and verify the upgrade:
kubectl get pods -n <portworx>
kubectl get storagecluster -n <portworx>noteYou can check the upgrade status of nodes at any time by running
kubectl get storagenodes -A, which shows which nodes have been upgraded and the node currently being upgraded.
After a successful upgrade, all PX-CSI pods run on the new version.
Upgrade from 25.6 or earlier
If you are running PX-CSI 25.6 or earlier, upgrade to the latest version by migrating to the new Kubernetes-native architecture introduced in PX-CSI 25.8.0. This migration removes components such as KVDB and system services, and stores all metadata as Kubernetes custom resources in the cluster's etcd.
- The migration might briefly disrupt the creation of new persistent volume claims (PVCs) or attaching existing volumes to new nodes. Plan this operation during a maintenance window to reduce impact.
- If the migration process fails with unrecoverable issues, you must contact Portworx Support for assistance.
What changes during migration
- KVDB and system services are removed.
- All metadata is stored as Kubernetes custom resources in the cluster's etcd.
- A
ComponentK8sConfigCR namedpx-pure-csi-k8s-configis created to configure CPU and memory limits, tolerations, and node affinity. For more information, see Configure resource limits. - The image name changes to
portworx/px-pure-csi-driver. - The
pxctlCLI is removed. Usekubectl,oc, or apply YAML manifests to manageCustomResourceobjects.
Prerequisites
Ensure the following prerequisites are met:
-
Your Kubernetes cluster meets the system requirements.
-
All Portworx pods including KVDB are in a
Runningstate:kubectl get pods -n <portworx> -
Delete any stale volumes from KVDB before migrating.
Update the StorageCluster image and migrate to the new architecture
- OpenShift Container Platform
- Other Kubernetes platforms
-
Retrieve the name of your Portworx
StorageCluster:oc get storagecluster -n <portworx> -
Edit the
StorageClusterresource to update the image:oc edit storagecluster -n <portworx> <px-cluster-name>Find the following section:
apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: px-cluster-xxxxxxxx-xxxx-xxxx-xxxx-f7ed5df73365
namespace: <portworx>
spec:
image: portworx/oci-monitor:<current-version>Change the
spec.imagevalue fromportworx/oci-monitortoportworx/px-pure-csi-driverwith the desired version (for example, 26.1.0):spec:
image: portworx/px-pure-csi-driver:26.1.0 -
(Optional) If migrating from Portworx Essentials with FlashArray/FlashBlade:
portworx.io/misc-args: "--oem px-csi" -
Save the changes and monitor the migration:
-
Check the status of migration pods:
oc get pods -n <portworx> | grep pure-csi-migrator -
View the
StorageClusterstatus:oc get storagecluster -n <portworx> -o yamlVerify that the migration status is complete:
status:
clusterName: px-cluster-xxxxxxxx-xxxx-xxxx-xxxx-f7ed5df73365
clusterUid: xxxxxxxx-xxxx-xxxx-xxxx-415323ca725b
conditions:
- lastTransitionTime: "2025-09-03T08:33:13Z"
message: Pure CSI Driver migration completed successfully
source: PxCSI
status: PureCSIMigrationCompleted
type: PxCSIMigration -
Verify that the
PureStorageClusterresource was created:oc get purestoragecluster -n <portworx>
-
-
Verify the migration:
oc get pods -n <portworx>
oc get storagecluster -n <portworx>
-
Retrieve the name of your Portworx
StorageCluster:kubectl get storagecluster -n <portworx> -
Edit the
StorageClusterresource to update the image:kubectl edit storagecluster -n <portworx> <px-cluster-name>Find the following section:
apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: px-cluster-xxxxxxxx-xxxx-xxxx-xxxx-f7ed5df73365
namespace: <portworx>
spec:
image: portworx/oci-monitor:<current-version>Change the
spec.imagevalue fromportworx/oci-monitortoportworx/px-pure-csi-driverwith the desired version:spec:
image: portworx/px-pure-csi-driver:26.1.0 -
(Optional) If you are migrating from Portworx Essentials with FlashArray/FlashBlade to PX-CSI, update the
portworx.io/misc-argsannotation to include:portworx.io/misc-args: "--oem px-csi" -
Save the changes and monitor the migration:
-
Check the status of migration pods:
kubectl get pods -n <portworx> | grep pure-csi-migrator -
View the
StorageClusterstatus:kubectl get storagecluster -n <portworx> -o yamlVerify that the migration is complete:
status:
clusterName: px-cluster-xxxxxxxx-xxxx-xxxx-xxxx-f7ed5df73365
clusterUid: xxxxxxxx-xxxx-xxxx-xxxx-415323ca725b
conditions:
- lastTransitionTime: "2025-09-03T08:33:13Z"
message: Pure CSI Driver migration completed successfully
source: PxCSI
status: PureCSIMigrationCompleted
type: PxCSIMigration -
Verify that the
PureStorageClusterresource was created:kubectl get purestoragecluster -n <portworx>
-
-
Verify the migration:
kubectl get pods -n <portworx>
kubectl get storagecluster -n <portworx>
After a successful migration:
- Older pods are removed
- New pods prefixed with
px-pure-csi-are created - Migrator pods are retained for debugging
Clean up stale files
After the migration, some stale files, including pxctl, may remain on the nodes. Clean them up using the following command:
rm -rf /opt/pwx
rm -rf /etc/pwx
KVDB drives are not automatically deleted after migration. After completing a successful migration, verify that the migration has completed successfully before manually deleting the KVDB drives.
Troubleshooting
If the migration job fails, it automatically retries every 10 minutes. Migration is performed by the pre-pure-csi-migrator and post-pure-csi-migrator pods.
To investigate issues:
-
Check the logs of the migrator pods to identify the root cause:
kubectl logs -n <portworx> <migrator-pod-name> -
If needed, manually delete the failed job to trigger a rerun:
kubectl delete job -n <portworx> <migrator-job-name>