A reproducible Proof of Concept demonstrating Kubernetes native persistent storage using StorageClass, PersistentVolume, PersistentVolumeClaim and a CSI driver.
Kubernetes provides a native storage model that abstracts the underlying storage infrastructure through the Container Storage Interface (CSI).
This Proof of Concept demonstrates how Kubernetes dynamically provisions persistent storage using:
- 📦 StorageClass
- 💾 PersistentVolumeClaim (PVC)
- 🗄️ PersistentVolume (PV)
- 🐳 Pod volume mounting
The objective is to understand the complete lifecycle of persistent storage without relying on any application-specific configuration.
This Proof of Concept demonstrates how Kubernetes natively manages persistent storage.
After completing this repository, you will understand:
- ✅ how a StorageClass provisions storage dynamically;
- ✅ how a PersistentVolumeClaim requests storage;
- ✅ how Kubernetes automatically binds a PersistentVolume;
- ✅ how a Pod consumes persistent storage;
- ✅ why data persists after Pod recreation.
- ☸️ Kubernetes v1.27 or later
- 💽 A CSI driver supporting dynamic provisioning
- 🔧
kubectl - 📦 A default StorageClass or adapt the provided manifests
Deploy the StorageClass (if required):
kubectl apply -f k8s/storageclass.yamlCreate the PersistentVolumeClaim:
kubectl apply -f k8s/pvc.yamlDeploy the demonstration Pod:
kubectl apply -f k8s/pod.yamlVerify that all resources are running:
kubectl get storageclass
kubectl get pv
kubectl get pvc
kubectl get podCreate a file inside the mounted volume:
kubectl exec demo -- sh -c "echo OMSL > /data/demo.txt"Display the file:
kubectl exec demo -- cat /data/demo.txtDelete the Pod:
kubectl delete pod demoRecreate it:
kubectl apply -f k8s/pod.yamlVerify that the file still exists:
kubectl exec demo -- cat /data/demo.txt🎉 If the file is still present, Kubernetes has successfully preserved the persistent data.
Display storage resources:
kubectl get storageclass
kubectl get pv
kubectl get pvcDescribe the PersistentVolumeClaim:
kubectl describe pvc demo-pvcInspect the mounted filesystem:
kubectl exec demo -- df -h /dataBy completing this Proof of Concept, you will learn:
- 📦 Kubernetes native storage architecture
- ⚡ Dynamic volume provisioning
- 🗄️ StorageClass concepts
- 💾 PersistentVolume lifecycle
- 📄 PersistentVolumeClaim lifecycle
- 🐳 Pod volume mounting
- 🔒 Persistent data across Pod recreation
Remove all deployed resources:
kubectl delete -f k8s/OpenMind Systems Lab is an independent French non-profit association dedicated to research, experimental development and technical benchmarking in Cloud Native technologies.
Our mission is to produce practical, reproducible and educational Open Source Proofs of Concept covering Kubernetes, Platform Engineering, Distributed Messaging, Infrastructure Security and Artificial Intelligence.
GitHub Organization:
https://github.com/openmind-systems-lab
Made with ❤️ by OpenMind Systems Lab

