
- The CSI driver is the plugin that actually talks to the external storage backend.
- A StorageClass is a Kubernetes object that describes provisioning behavior and references the CSI provisioner.
- PersistentVolumes (PVs) represent actual storage resources. PVs may be created statically by an administrator or dynamically by a StorageClass/provisioner.
- PersistentVolumeClaims (PVCs) are requests for storage from pods. A PVC specifies size, access modes, and optionally a StorageClass. When dynamic provisioning is enabled, the StorageClass/provisioner creates a PV that satisfies the PVC.
- Dynamic provisioning: PVC → StorageClass → CSI provisioner → provision storage → create PV → bind to PVC.
- Static provisioning: Admin creates PV → PVC binds to existing PV.
The term “persistent storage” in OpenShift maps directly to Kubernetes PersistentVolumes. The StorageClass, PersistentVolume, and PersistentVolumeClaim objects behave the same in both platforms.
Example: StorageClass + PVC + Deployment using Azure Files CSI
- The StorageClass references the Azure Files CSI provisioner (
file.csi.azure.com) and sets mount options and parameters (for example, SKU). - The PVC requests storage from that StorageClass.
- The Deployment mounts the resulting volume into nginx containers.
-
StorageClass (
azurefile-csi)provisioner: file.csi.azure.compoints to the Azure Files CSI driver.allowVolumeExpansion: trueenables resizing the volume after provisioning.mountOptionsandparameterssuch asskuName: Premium_LRScontrol how the Azure Files share is created and mounted.
-
PersistentVolumeClaim (
azurefile)- Requests
10GiwithReadWriteManyaccess and explicitly references theazurefile-csiStorageClass. - When the PVC is created, the StorageClass/provisioner dynamically provisions a backing PV and binds it to the PVC.
- Requests
-
Deployment (
nginxdeployment)- Mounts the bound PVC at
/mnt/azurein each nginx pod usingvolumeMountsandvolumes. - The
claimNamemust match the PVC name.
- Mounts the bound PVC at
- Kubernetes Container Storage Interface (CSI): https://kubernetes.io/docs/concepts/storage/container-storage-interface/
- StorageClass docs: https://kubernetes.io/docs/concepts/storage/storage-classes/
- PersistentVolume and PersistentVolumeClaim: https://kubernetes.io/docs/concepts/storage/persistent-volumes/