Using volumes

Like plain Docker, Kubernetes supports volumes. The main difference is that Kubernetes supports them at the pod level. This means that a volume configured in a pod is available and may be used by every container in the pod for reading and writing. Second, Kubernetes volumes may use multiple different types of network storage at the same time.

Volumes come in two forms, the first is an ephemeral volume that lives only as long as the pod using it. When the pod is deleted, so is the volume. The second is a persistent volume that persists data even when a pod is deleted.

Using plain volumes

Volumes in Kubernetes behave a lot like volumes do in plain Docker. They are only expected to live as long as the pods using them. Every container in ...

Get Docker Orchestration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.