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
volumeModeis set toFilesystem.In the pod definition:
Specify the
volumeAttributesas follows:subsystem: as in the storage class definition.vip_pool_fqdnorvip_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
nodePublishSecretRefoption.Specify the filesystem type on the
fsTypeparameter.
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