Volumes
If you have worked with containers, we know that when a container is started, it starts with a clean slate due to the underlying Copy on Write mechanism, which means that the files are ephemeral and are not stored normally.
This can become a problem when the pod is running multiple containers, or when the pod is running software such as a database. In these cases, the data needs to be persisted across the creation and deletion of not only containers but pods too.
In order to solve this, Kubernetes has volumes (a very similar concept to Docker, but more tightly managed in comparison). The Kubernetes system creates persistent volumes that are then exposed to the pods.
Kubernetes supports the following for persistent storage (non-exhaustive ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access