Skip to main content
Welcome to this OpenShift for Absolute Beginners lesson on storage. This article explains how OpenShift (Kubernetes) provides persistent storage for containerized applications using Persistent Volumes (PVs), Persistent Volume Claims (PVCs), and StorageClasses. You’ll learn how storage is provisioned, claimed, and mounted into pods, plus an example manifest and verification commands. Containers are ephemeral by design: when a container is removed, any data stored inside it is lost. To retain data beyond a container’s lifecycle, attach persistent storage. OpenShift uses the Kubernetes persistent volume framework to expose cluster storage to applications. Storage can come from many backends and plugins, such as local disks, iSCSI, Fibre Channel, NFS, GlusterFS, Ceph RBD, OpenStack Cinder, cloud provider disks (AWS, GCE, Azure), or VMware vSphere.
A presentation slide titled "Plugins" showing a bullet list of storage plugins (Local, iSCSI, Fibre Channel, NFS, GlusterFS, Ceph RBD, OpenStack Cinder, AWS/GCE/Azure disks, VMWare vSphere, etc.). On the right is a red 3D diagram with stacked blocks and cylinder database icons.
When a storage provider is added to an OpenShift cluster, it contributes PersistentVolumes to the cluster’s pool of PV resources. Projects (namespaces) request storage from this pool by creating PersistentVolumeClaims. The control plane binds a PVC to an appropriate PV. Once bound, the PV can be mounted into pods and used as durable application storage.
A stylized Kubernetes storage diagram showing three red PVC cubes labeled "PVC – 10GB", "PVC – 100GB", and "PVC – 20GB" placed over larger red PV resource blocks. Disk stack icons and the label "PV Resources – 1TB" indicate those PVCs are backed by persistent storage.
From the OpenShift web console you can create storage by clicking Create Storage. Give the claim a name, choose an access mode, and set the requested size. Access modes control how the volume may be mounted by nodes:
A screenshot of a "Create Storage" form showing fields for name, access mode (Single User / Shared Access / Read Only) and size. To the right is a red icon illustrating three users connecting to a shared storage volume.
Add the claim in your project and then reference that claim from pod or deployment specs. If your cluster has a StorageClass that supports dynamic provisioning, creating a PVC will automatically create a matching PV. Otherwise, a cluster administrator must create a PV that satisfies the PVC.
If a StorageClass exists that supports dynamic provisioning, a PVC will trigger automatic PV creation. If no suitable StorageClass is available, the PVC will remain unbound until an admin provides a matching PV.
Below is a concise example demonstrating how to create a PVC and mount it into a Deployment. Save the manifests into files and apply them with oc apply -f <file> or kubectl apply -f <file>. PersistentVolumeClaim example (10Gi, ReadWriteOnce):
Deployment example that mounts the PVC at /data:
Create the PVC and deployment:
Verify the PVC is bound and see which PV satisfies it:
Key points to remember:
  • The manifest pattern is the same across controllers: reference the claim under volumes and mount it in volumeMounts inside the container spec.
  • Dynamic provisioning via StorageClass simplifies lifecycle management by automatically creating PVs.
  • Choose access modes based on whether multiple nodes must access the same storage and whether they need read-write access.
References and further reading: This concludes the overview of how storage is provisioned and consumed in OpenShift. Once a PVC is bound and mounted into a pod, data written to the mounted path persists independently of the pod lifecycle.

Watch Video