<p>One of the things I noticed is that Helm charts that require persistence (e.g. Postgres) contain a persistent volume claim but not a default persistent volume.</p>
<p>It seems that it is assumed that this should not be part of the Helm chart and should be provisioned separately.</p>
<p>Is there some best practice or idea behind the lack of a pv (maybe with templated options) or at least a default one? This would allow running the chart out of the box.</p>

<p>Stateful apps' helm charts assume volumes were provisioned beforehand using storage static provisioning or on-demand using dynamic provisioning.</p>
<p>Storage provisioning includes storage allocation, creation of PV object and binding it to the storage. This is usually done manually by storage admins for static provisioning or automatically by default storage class for dynamic provisioning.</p>
<p>If you install a helm chart in managed Kubernetes cluster on cloud or even Minikube, there's default storage class which will dynamically provision the storage based on helm chart's PVC and bind the provisioned PV to it. (request for storage)</p>
<p>If you prefer the chart to use statically provisioned PVs, you should disable using default storage class in chart's <code>values.yaml</code> or even specify the volume to be used there (the exact syntax and options may change from chart to chart, but the idea is the same).</p>
<p>Using dynamic provisioning has many advantages over static provisioning which I summarized in my blog post on <a href="https://www.rokpoto.com/kubernetes-storage-dynamic-provisioning/" rel="nofollow noreferrer">Dynamic Provisioning of Kubernetes Storage</a></p>
