Provisioning Ephemeral Block Volumes

Prev Next

VAST Block CSI Driver supports Ephemeral Volumes (EVs). You can provision PVCs directly from pod definitions, which are discarded once the pod is terminated.

To provision ephemeral volumes:

  • In the PVC, ensure that volumeMode is set to Filesystem.

  • In the pod definition:

    • Specify the volumeAttributes as follows:

      • subsystem: as in the storage class definition.

      • vip_pool_fqdn or vip_pool_name: as in the storage class definition.

      • size: as in the PVC.

    • If you have not specified a global secret in the VAST Block CSI Driver's Helm chart configuration file, specify the secret to use for the ephemeral volumes on the nodePublishSecretRef option.

    • Specify the filesystem type on the fsType parameter.

For example:

apiVersion: v1
kind: Pod
metadata:
  name: some-pod
spec:
  containers:
  - command:
    - sh
    - -c
    - while true; do date -Iseconds >> /shared/$HOSTNAME; sleep 1; done
    image: busybox
    name: my-frontend
    volumeMounts:
    - mountPath: /shared
      name: my-eph-vol
  volumes:
  - csi:
      driver: block.csi.vastdata.com
      volumeAttributes:
        size: 5G
        subsystem: myblock
        vip_pool_fqdn: 'MyDomain'
      nodePublishSecretRef:
        name: vast-mgmt
      fsType: xfs
    name: my-eph-vol