Kubernetes volume
A directory declared in a pod spec and mounted into its containers, backed by anything from temporary node disk to network storage.
In more detail
The pod lists volumes, and each container mounts the ones it needs at a mountPath. Containers in the same pod can share files through a volume. Whether data outlives the pod depends on the volume type: emptyDir does not, a PersistentVolumeClaim does.
Related terms
- emptyDir — A Kubernetes volume that starts empty when a pod starts and is deleted when the pod ends.
- PersistentVolumeClaim — A namespaced request for storage of a given size and access mode, which Kubernetes binds to a matching PersistentVolume.
- volume — Storage managed by Docker that lives outside any container, so data survives when the container is removed.
Taught in
- ConfigMaps, Secrets And Configuration Updates — Kubernetes: Production-Grade Container Orchestration
- Volumes, PersistentVolumes And PersistentVolumeClaims — Kubernetes: Production-Grade Container Orchestration
- StatefulSets, Stable Identity And Data Recovery — Kubernetes: Production-Grade Container Orchestration