Is there a way to create a persistent volume per pod in a kubernetes deployment (or statefulset)? Is there a way to create a persistent volume per pod in a kubernetes deployment (or statefulset)? kubernetes kubernetes

Is there a way to create a persistent volume per pod in a kubernetes deployment (or statefulset)?


Deployment replicas all use the same volume. There is no possibility currently to create independent volumes per replica.

StatefulSets can define volumeClaimTemplates which means one or more independent volumes per replica. For that to work StorageClass must be capable of dynamic volume provisioning.