Enable CSI


Prerequisites

Before you install and use Portworx with CSI, ensure you meet the prerequisistes:

  • Openshift users must use Openshift 4.1 or higher
  • Kubernetes users must use 1.13.12 or higher
  • Certain features may require newer versions of Kubernetes or Portworx

Overview

The Portworx CSI Driver requires additional components called CSI Sidecars in order to function properly. To make sure these components and their dependencies are installed on your cluster, follow the instructions below.

Portworx CSI installed by default

Starting with the Portworx Operator 1.5 and higher, CSI is enabled by default for new Portworx installations. Due to the nature of CSI and its dependencies, it is highly recommend to use the Portworx Operator instead of the spec generator for installation.

The Portworx Operator easily manages all CSI components based on your Kubernetes and Portworx versions. This makes upgrading Kubernetes and Portworx versions far easier.

Note: Explicitly disabling CSI will also prevent the Pure Storage FlashBade DirectAccess mode from working.

Portworx Operator 1.8 and higher

Starting with the Portworx Operator 1.8 and higher, new syntax is available for CSI, which is enabled by default for new Portworx installations. The default values are as follows:

spec:
  csi:
    enabled: true
    installSnapshotController: false

Migrations to Operator 1.8

If you migrate from an earlier version to Operator 1.8, your spec is automatically converted to match the new syntax. It will reflect the value you had previously set for spec.featureGates.CSI.

If you previously enabled Snapshot Controller manually, your existing controller will still work but spec.csi.installSnapshotController will be set to false. If you wish to switch to a Snapshot Controller installation that is managed by Portworx, remove your Snapshot Controller deployment and set spec.csi.installSnapshotController equal to true.

Portworx Operator 1.5 through 1.7

CSI is installed and enabled by default for new installations as previously described. The syntax is as follows:

spec:
  featureGates:
    CSI: "true"

Portworx Operator 1.4 and earlier

Older operator versions do not enable CSI by default. It is highly recommended to upgrade to Portworx Operator 1.5 or later.

To enable CSI on older Portworx Operator versions, you may set the following CSI feature gate:

spec:
  featureGates:
    CSI: "true"

Openshift installation

If you are using Openshift, you must add the px-csi-account service account to the privileged security context.

oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:px-csi-account
Note: If you experience the following error: “errorUnable to update cluster as v1alpha1 version of … Remove these CRDs to allow the upgrade to proceed”, follow this solution from RedHat.

Contribute

Portworx, Inc. welcomes contributions to its CSI implementation, which is open-source and repository is at OpenStorage. In addition, we also encourage contributions to the Kubernetes-CSI open source implementation.



Last edited: Monday, May 16, 2022