Creating ephemeral volumes
Some applications like caching services do not require persistent storage. Ephemeral volumes are temporary volumes which such applications can utilize. You can use InfoScale CSI drivers to create generic ephemeral volumes.
Ephemeral volumes can be created in block mode also by setting volumeMode to 'Block'. Snapshotting, cloning, and resizing are also supported. See the sections above to know more.
Complete the following steps to create ephemeral volumes by using an InfoScale CSI driver storage class.
-
Copy the following content and save as
ephemeral_volume_pod.yaml.
kind: Pod
apiVersion: v1
metadata:
name: test-pod
spec:
containers:
- name: test-pod-container
image: busybox
volumeMounts:
- mountPath: "/ephemeral"
name: ephemeral-volume
command: [ "sleep", "1000000" ]
volumes:
- name: ephemeral-volume
ephemeral:
volumeClaimTemplate:
metadata:
labels:
type: test-pod-volume
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "vxvmsc-mirror"
resources:
requests:
storage: 1Gi
-
Run the following command to create an application pod with the ephemeral volume.
kubectl/oc apply -f ephemeral_volume_pod.yaml
-
Run the following command to verify.
kubectl/oc get pvc
Related information