PX-CSI PersistentVolumeClaim Reference
PX-CSI uses standard Kubernetes PersistentVolumeClaim resources with PX-CSI-specific annotations for static provisioning and encryption.
PersistentVolumeClaim
| Field | Description | Type |
|---|---|---|
apiVersion | The Kubernetes API version for the PersistentVolumeClaim object. Typically v1. | string |
kind | The kind of Kubernetes object, always PersistentVolumeClaim. | string |
metadata.name | The name of the PersistentVolumeClaim. | string |
metadata.annotations | PX-CSI-specific annotations for static provisioning and encryption. See PX-CSI-specific annotations below. | object |
spec.accessModes | Defines how the volume can be mounted. Refer to the Kubernetes documentation for options ReadWriteOnce, ReadWriteMany, or ReadOnlyMany. | array |
spec.resources.requests.storage | The amount of storage requested for the volume. | string |
spec.storageClassName | The name of the StorageClass to use for dynamic provisioning. Omit for static provisioning. | string |
spec.volumeMode | Defines whether the volume is a filesystem (Filesystem) or raw block device (Block). | string |
spec.dataSource | Reference to a source for cloning or restoring from snapshots. Supported source types: - PersistentVolumeClaim (for cloning an existing PVC)- VolumeSnapshot (for restoring from a snapshot)Refer to the Kubernetes documentation for details. | object |
PX-CSI-specific annotations
| Annotation | Description | Type | Required/Optional |
|---|---|---|---|
portworx.io/pure-volume-name | The name of the existing volume on the Pure Storage array for static provisioning. Format: - FlashArray block: <realm>::<pod_name>::<volume_name> (realm and pod_name are optional)- FlashArray File Services: <pod_name>::<filesystem_name> (pod_name is optional)- FlashBlade: <filesystem_name> | string | Required for static provisioning |
portworx.io/pure-array-id | The ID of the Pure Storage array where the volume exists. Use this when you have multiple arrays with volumes of the same name. | string | Optional |
px/secure | When set to "true", enables encryption for this specific PVC. Requires a cluster-wide encryption key to be configured. Only supported for FlashArray block volumes. | string | Optional |
Example PersistentVolumeClaim
Dynamic provisioning
- FlashArray block volumes
- FlashArray file services
- FlashBlade file systems
- FlashBlade//EXA
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pure-claim-fa
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: px-fa-direct-access
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pure-claim-fa-file
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 20Gi
storageClassName: fa-file-sc
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pure-claim-fb
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
storageClassName: px-fb-direct-access-nfsv4
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pure-claim-fb-exa
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi # Size is required for Kubernetes validation but not used for provisioning
storageClassName: portworx-csi-fb-exa
Static provisioning
- FlashArray block volumes
- FlashArray file services
- FlashBlade file systems
- FlashBlade//EXA
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: preprovisioned-fa-pvc
annotations:
portworx.io/pure-volume-name: "<existing-volume-name>" # Format: <realm>::<pod_name>::<volume_name> if using realm and pod
# For ActiveCluster: <stretched-pod-name>::<volume-name>
# portworx.io/pure-array-id: "<your-flasharray-id>" # Optional: specify array ID if you want to import the volume from specific array
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi # Must match the size of the existing volume on FlashArray
storageClassName: px-fa-direct-access
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: preprovisioned-fa-files-pvc
annotations:
portworx.io/pure-volume-name: "<existing-filesystem-name>" # Format: <pod_name>::<filesystem_name> (pod_name is optional)
# portworx.io/pure-array-id: "<your-flasharray-id>" # Optional: specify array ID if you want to import the volume from specific array
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 500Gi # Must match the size of the existing file system
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: preprovisioned-fb-pvc
annotations:
portworx.io/pure-volume-name: "<existing-filesystem-name>"
# portworx.io/pure-array-id: "<your-flashblade-id>" # Optional: specify array ID if you want to import the volume from specific array
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Ti # Must match the size of the existing file system on FlashBlade
storageClassName: px-fb-direct-access-nfsv4
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: preprovisioned-fb-exa-pvc
annotations:
portworx.io/pure-volume-name: "<existing-filesystem-name>"
# portworx.io/pure-array-id: "<your-flashblade-id>" # Optional: specify array ID if you want to import the volume from specific array
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Ti # Size must match the existing file system size
storageClassName: portworx-csi-fb-exa