Volumes and Persistent Storage
Part of the Kubernetes course
Everything you have deployed so far has been amnesiac on purpose. A Pod starts, does its job, and when it dies the filesystem it was writing to dies with it. For a web server handing out pages that is exactly right. For a database it is a disaster, and the first time you find out is when a node reboots and your data is simply gone.
The reason is worth being precise about, because it is not an accident. A Pod is one running copy of your application, and Kubernetes treats it as disposable: it will move Pods between machines, replace them during an update, and restart them when they crash. If the data lived inside the Pod, moving the Pod would move the data, and moving data between machines is not something a scheduler can do casually. ...
Want to learn Kubernetes Volumes and Persistent Storage in a real environment?
Click below, get a fresh Linux box with Kubernetes ready to go, and work through Volumes and Persistent Storage hands-on with an AI tutor that knows your code.
Start this lessonVolumes and Persistent StorageWhat you'll learn
- EmptyDir
- PersistentVolumeClaim
- StorageClass
- PVC manifest
- Mount in a Deployment
Read this lesson in your language
All lessons in this course
14 lessons- 1What is Kubernetes25 min
- 2Your First Pod30 min
- 3Deployments and ReplicaSets35 min
- 4Services35 min
- 5Probes and Self-Healing35 min
- 6ConfigMaps and Secrets35 min
- 7Volumes and Persistent Storage35 min
- 8Namespaces and Labels25 min
- 9Ingress35 min
- 10Helm Basics35 min
- 11Scaling and HPA30 min
- 12RBAC35 min
- 13Observability30 min
- 14Capstone: Deploy a Stack60 min
