Provisioning Ephemeral Volumes

Prev Next

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

Specify the volumeAttributes as follows:

  • root_export: as in the storage class definition.

  • view_policy: as in the storage class definition.

  • vip_pool_name: as in the storage class definition.

  • size: as in the PVC.

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: csi.vastdata.com
      volumeAttributes:
        root_export: /k8s
        view_policy: default
        vip_pool_name: vippool-1
        size: 1G
    name: my-eph-vol