Portworx Documentation has moved to https://docs.portworx.com
Portworx Enterprise version 2.13 has reached end of life and end of extended maintenance. Refer to the release support policy doc here.
Upgrade to the latest version of Portworx Enterprise for continued support. Documentation for the latest version of Portworx Enterprise can be found here.
Upgrade to the latest version of Portworx Enterprise for continued support. Documentation for the latest version of Portworx Enterprise can be found here.
Step 3: Set up the StorageClass
StorageClass for CSI
The following CSI StorageClass enables your tenants to create volumes using their token stored in a secret in their namespace.
When using CSI, the storage class references the secret for the three types of supported operations:
- provision
- node-publish (mount/unmount)
controller-expand
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: px-storage provisioner: pxd.portworx.com parameters: repl: "1" csi.storage.k8s.io/provisioner-secret-name: px-user-token csi.storage.k8s.io/provisioner-secret-namespace: ${pvc.namespace} csi.storage.k8s.io/node-publish-secret-name: px-user-token csi.storage.k8s.io/node-publish-secret-namespace: ${pvc.namespace} csi.storage.k8s.io/controller-expand-secret-name: px-user-token csi.storage.k8s.io/controller-expand-secret-namespace: ${pvc.namespace} allowVolumeExpansion: true
Note the value ${pvc.namespace}
. This will ensure that the CSI controller
gets the appropriate token, which is tied to the namespace of the PVC.
Last edited: Tuesday, May 16, 2023
Questions? Visit the Portworx forum.