Generic Ephemeral volumes
FEATURE STATE: Kubernetes v1.23+ [stable]
Generic ephemeral volumes also work with typical storage operations such as snapshotting, cloning, resizing, and storage capacity tracking.
The following steps will allow you to create a generic ephemeral volume with the Portworx CSI Driver.
In this example we are using the
px-csi-db storage class out of the box. Please refer CSI Enabled Storage Classes for a list of available CSI enabled storage classes offered by Portworx.
Create a pod spec that uses a Portworx CSI Driver StorageClass, declaring the ephemeral volume as seen below in a YAML file named
- name: my-frontend
- mountPath: "/scratch"
command: [ "sleep", "1000000" ]
- name: scratch-volume
accessModes: [ "ReadWriteOnce" ]
ephemeral-volume-pod.yamlspec to create the pod with a generic ephemeral volume:
kubectl apply -f ephemeral-volume-pod.yaml
Migration to CSI PVCs
Currently, you cannot migrate or convert PVCs created using the native Kubernetes driver to the CSI driver. However, this is not required, and both types of PVCs can co-exist on the same cluster.