Platform

image.png

image.png

Note: MongoDB is used as the example throughout these notes. The concepts — Volumes, PV, PVC — are not MongoDB-specific. They apply to any stateful application (PostgreSQL, MySQL, Redis, etc.) that needs data to survive pod restarts.


Official docs: https://kubernetes.io/docs/concepts/storage/persistent-volumes/


Table of Contents

  1. Why Volumes Exist
  2. Volume Levels
  3. PV and PVC — The Concept
  4. hostPath vs local — Key Difference
  5. PV Status — Available vs Bound
  6. YAML Files
  7. How It All Connects
  8. Verifying Volume on the Node
  9. Using PVC in a Deployment
  10. Key Rules
  11. Quick Reference

1. Why Volumes Exist