Dynamic Volume Provisioning: Storage on Demand

Dynamic Volume Provisioning lets you request storage by its type (e.g., "fast-ssd") instead of pre-provisioning a disk. Kubernetes automatically creates a matching volume. This is standard for stateful apps.
Why it exists
Manually provisioning storage for every application is slow, error-prone, and doesn't scale. Administrators would have to pre-create dozens of PersistentVolumes (PVs) in their cloud provider or data center, hoping they match the sizes and types developers will need. This creates operational bottlenecks.
The mental model
Think of it as storage on-demand. Instead of an admin pre-carving a specific disk (a PersistentVolume) and you having to know its exact name, you just submit a request (a PersistentVolumeClaim or PVC) describing what you need: "I need 10Gi of fast storage." Kubernetes finds a provisioner that can satisfy that request and creates the volume for you automatically.
How it works
The process involves three key objects. First, an administrator defines one or more StorageClass resources. A StorageClass names a type of storage (e.g., gce-pd-ssd, aws-ebs-gp3) and points to a driver that knows how to create it. Second, a developer creates a PersistentVolumeClaim (PVC) requesting a certain amount of storage from a specific StorageClass. Third, the Kubernetes control plane sees the PVC, invokes the correct provisioner, and a new PersistentVolume (PV) is created and bound to the PVC, ready for a Pod to use.
When to use it
Use dynamic provisioning whenever you need persistent storage for workloads in a Kubernetes cluster. It's the standard, cloud-native way to manage storage for databases, message queues, or any application that needs to save state beyond a single Pod's lifecycle. It's essential for automated, scalable deployments.
When not to use it
You might use static provisioning (manually creating PVs) if you need to connect to an existing, pre-populated storage volume that wasn't created by Kubernetes. It's also sometimes used in on-premise environments with storage systems that lack a compatible driver, forcing manual intervention.
One canonical example
A developer needs to deploy a PostgreSQL database. They create a PersistentVolumeClaim asking for "100Gi" of storage from the high-iops-ssd StorageClass. The cluster's dynamic provisioner, seeing this claim, calls the cloud provider's API to create a new 100Gi SSD disk. It then creates a PersistentVolume object representing that disk and binds it to the developer's claim. The PostgreSQL Pod can now mount this volume and use it to store its data.
Interview question
Which Kubernetes object serves as the primary request from a developer to automatically provision a new storage volume using dynamic provisioning?
- a.PersistentVolumeClaim (PVC)Correct
- b.PersistentVolume (PV)
- c.StorageClass
- d.Pod definition
Why? this is the answer
A PersistentVolumeClaim (PVC) is the specific request made by a developer for storage, which then triggers the dynamic provisioning process. A PersistentVolume (PV) is the resulting storage object created by the system, not the request itself.
Just read this? Test yourself on what you have been reading.
Read the original → kubernetes.io
- #kubernetes
- #storage
- #stateful apps
- #devops
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.
See open roles