liveBook · Manning

Dynamic provisioning

As explained in Kubernetes for Developers

Dynamic provisioning automatically creates persistent storage resources when a workload submits a compatible storage request.

Dynamic provisioning creates a persistent storage resource when a workload submits a compatible PersistentVolumeClaim. Kubernetes then binds the new PersistentVolume to that claim, so the application can use storage without an administrator preparing a volume first. section 9.1.2 section 9.5

The provisioning flow connects several Kubernetes storage objects:

  • A PersistentVolumeClaim requests capacity and an access mode, such as 2 GiB with ReadWriteOnce. section 9.1.2
  • A StorageClass defines how the requested PersistentVolume is provisioned, usually through the cluster provider’s default class. section 9.1.2
  • The provider creates the backing disk, and Kubernetes binds the resulting PersistentVolume to the claim. section 9.1.2
  • Without dynamic provisioning, an administrator must create a sufficiently large PersistentVolume manually; Kubernetes still performs the matching. section 9.1.2

MariaDB claim

A MariaDB Pod references the claim mariadb-pv-claim. Applying its manifest requests 2 GiB with ReadWriteOnce; the claim receives a standard-rwo StorageClass, becomes Bound, and references a provider-created PersistentVolume backed by a disk.

How Kubernetes for Developers covers it

How deep it goes
Traces claims, StorageClasses, disks, PersistentVolumes, and binding, while deferring detailed StorageClass configuration.
Examples
Uses a MariaDB Pod requesting 2 GiB, kubectl output showing Bound objects, and a provider-backed CSI disk.
What it assumes
Introduces claims, volumes, access modes, and StorageClasses while assuming a Kubernetes cluster with provider storage support.
What you can do after
Apply dynamic storage through a PersistentVolumeClaim and inspect the resulting bound PersistentVolume.
How it connects
Connects PersistentVolumeClaim, PersistentVolume, StorageClass, access modes, StatefulSet, and reclaim policy.

Also explained in

Compare how 2 books explain dynamic provisioning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.