Dynamic Volume Provisioning Example Using a Pod

A PersistentVolumeClaim is a request for abstract storage resources by a user. The PersistentVolumeClaim would then be associated to a Pod resource to provision a PersistentVolume, which would be backed by a Lightbits volume.

An optional volumeMode can be included to select between a mounted file system (default) or raw block device-based volume.

Using the lb-csi-plugin, specifying Filesystem for volumeMode can support ReadWriteOnce accessMode claims, and specifying Block for volumeMode can support ReadWriteOnce accessMode claims.

Filesystem Volume Mode PVC

The file examples/filesystem-workload.yaml provided with the Supplementary Package contains two manifests:

  1. PVC named example-fs-pvc referencing example-sc StorageClass created above.
  2. POD named example-fs-pod binding to example-fs-pvc.

Deploying PVC and POD

To deploy the PVC and the POD, run:

Bash
Copy

Verifying Deployment

Using the following command we will see the PV, PVC resources in Bound status and POD in READY state.

Bash
Copy

Deleting PVC and POD

Bash
Copy

Block Volume Mode PVC

The file examples/block-workload.yaml provided with the Supplementary Package contains two manifests:

  1. PVC named example-block-pvc referencing example-sc StorageClass created above.
  2. POD named example-block-pod binding to example-block-pvc.

You can follow the same flow described in the Filesystem Volume Mode PVC section above, to deploy the block volume-mode example.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard