Skip to main content
Version: 26.1

Static Provisioning of FlashArray Block Volumes

Use PX-CSI to import existing FlashArray block volumes into Kubernetes. This page walks you through creating a PVC with annotations to import an existing volume and mounting it to a pod.

PX-CSI also supports importing volumes from FlashArray ActiveCluster. For more information, see Use FlashArray ActiveCluster for high availability.

Use this approach when volumes are pre-created on FlashArray and you want to consume them as PersistentVolumeClaims (PVCs) in your Kubernetes cluster.

PX-CSI manages all imported FlashArray block volumes and tags them for identification. Each imported volume receives a created-by: px-csi tag in the portworx.internal namespace.

Prerequisites

Before you begin, ensure you have:

  • An existing volume on FlashArray.
  • The volume name (and optionally, the array ID if you have multiple FlashArrays connected to your cluster).
  • PX-CSI version 26.1.0 or later.

Create a PVC

To import an existing FlashArray block volume, create a PVC with the required annotations.

  1. Create a PVC that references the existing FlashArray volume using the following annotations:

    • portworx.io/pure-volume-name (required): Use the format <realm>::<pod_name>::<volume_name>. The realm and pod_name are optional and only required if your volume exists within a specific realm and pod.
    • (Optional) portworx.io/pure-array-id: Specify the FlashArray ID to indicate which array to import the volume from when multiple FlashArrays are connected to your cluster.

    Example PVC specification:

    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 you are using realm and pod. For ActiveCluster setup, specify the stretched pod name.
    # portworx.io/pure-array-id: "<your-flasharray-id>" # Optional: specify array ID if you want to import the volume from specific array
    spec:
    storageClassName: px-fa-direct-access
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 100Gi # Must match the size of the existing volume on FlashArray
    note
    • The storage size in the PVC spec must match the size of the existing volume on FlashArray.
    • The storageClassName must reference a StorageClass with backend: "pure_block".
    • For a complete list of all available PVC fields and annotations, see PersistentVolumeClaim reference.
    important

    If a volume with the same name exists on multiple FlashArrays and you don't specify the portworx.io/pure-array-id annotation, PX-CSI may import the volume from any of those arrays. To ensure you import from the correct array, always specify the portworx.io/pure-array-id annotation when multiple FlashArrays are connected to your cluster.

    Save this YAML in a file named preprovisioned-pvc.yaml.

  2. Apply the YAML to your cluster:

    kubectl apply -f preprovisioned-pvc.yaml
    persistentvolumeclaim/preprovisioned-fa-pvc created
  3. Verify the PVC is bound:

    kubectl get pvc preprovisioned-fa-pvc
    NAME                     STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    preprovisioned-fa-pvc Bound pvc-abc123... 100Gi RWO 10s

Mount a PVC to a pod

To make the volume available to your workload, create a pod and attach the PVC using a volume mount.

  1. Create a pod specification that references the PVC:

    apiVersion: v1
    kind: Pod
    metadata:
    name: nginx-pod
    spec:
    volumes:
    - name: pure-vol
    persistentVolumeClaim:
    claimName: preprovisioned-fa-pvc
    containers:
    - name: nginx
    image: nginx
    volumeMounts:
    - name: pure-vol
    mountPath: /data
    ports:
    - containerPort: 80

    Save this YAML in a file named pod.yaml.

  2. Apply the YAML to your cluster:

    kubectl apply -f pod.yaml
    pod/nginx-pod created

Verify pod status

After deploying the pod, check its status to confirm that the volume is bound and attached successfully.

watch kubectl get pods

Wait for the STATUS column to show Running. Once the pod is running, the volume is mounted and ready for use.