Skip to content

Dynamic vs Static Volume Provisioning

Dynamic vs Static Volume Provisioning refers to the two primary methods for creating PersistentVolumes (PV) within a Kubernetes cluster to satisfy [[PersistentVolumeClaims]] (PVC).^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md]

Static Volume Provisioning

Static provisioning involves the cluster administrator manually creating the underlying storage resources and defining the PersistentVolume objects beforehand^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md].

In this model, the administrator acts as the provider who declares a specific block of storage space^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md]. Subsequently, users create PVCs to request this storage; the PVC continuously searches for a matching pre-existing PV based on criteria like capacity and access modes until a binding is established^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md].

If no matching static PV is found, the PVC will remain in a Pending state indefinitely^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md].

Dynamic Volume Provisioning

Dynamic Provisioning automates the creation of storage based on user demand^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md].

Instead of relying on pre-created volumes, this method triggers when a user's PVC specifies a StorageClass^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md]. Upon detecting this request, the Kubernetes cluster automatically provisions a new PV and the underlying storage resource, then binds it to the claim^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md].

If a PVC does not specify a specific class, it attempts to use the cluster's default StorageClass^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md]. To explicitly prevent Dynamic Provisioning, a PVC can request a storage class set to an empty string ("")^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md].

Comparison

Feature Static Provisioning Dynamic Provisioning
Creation Trigger Administrator creates PVs manually (Provisioner)^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md] User creates a PVC with a StorageClass^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md]
Availability Volumes must exist before PVCs are created Volumes are created on-demand
Management Manual maintenance of storage resources Automated via StorageClass and provisioners

Sources

^[400-devops-06-kubernetes-k8s-ithelp-day20-readme.md]