Emptydir volume
An emptyDir volume is a Kubernetes volume that starts empty, is available to containers in a Pod, and is deleted when the Pod leaves its node.
Kubernetes in Action, Second Edition
An emptyDir volume is a Kubernetes volume that starts empty, persists for the lifetime of its pod, and can be shared by containers in that pod.
- How it is used
- Provides temporary writable storage, preserves files across container restarts, and shares files between containers in one pod.
- How deep it goes
- Works through pod volume and container mount definitions, storage options, restart verification, and init-container initialization; does not detail persistent storage setup.
- Examples
- Uses a MongoDB pod manifest, database checks before and after a restart, and an init container that copies a startup script.
- What you can do after
- Build it from scratch in a Pod manifest, mount it in containers, and verify that files survive a container restart.
Read how Kubernetes in Action, Second Edition explains emptydir volume →
Kubernetes for Developers
emptyDir is a Kubernetes volume type that provides temporary node-backed storage for a Pod and is deleted when the Pod leaves the node.
- How it is used
- Shares temporary files between containers and retains cache or setup data across individual container restarts.
- How deep it goes
- Defines node-backed storage, lifecycle loss, restart persistence, and mounting patterns, but defers scratch-space alternatives.
- Examples
- Uses a cache mount and Redis configuration copied from a ConfigMap into shared emptyDir storage.
- What you can do after
- Apply it by declaring an emptyDir volume and mounting it wherever Pod containers need temporary shared storage.
Read how Kubernetes for Developers explains emptydir volume →
Acing the Certified Kubernetes Administrator Exam, Second Edition
An emptyDir volume is a Kubernetes volume type that provides initially empty storage for a pod and is deleted when the pod is deleted.
- How it is used
- Provides temporary pod-local storage for sidecars, log collection, and ephemeral application data.
- How deep it goes
- Defines YAML placement, mounts it into a container, verifies EmptyDir with kubectl describe, and contrasts it with persistent storage.
- Examples
- Uses a BusyBox log-collector mounted at /var/log and a Redis pod with ephemeral data.
- What you can do after
- Build it from scratch with kubectl and YAML, then verify the pod and mounted volume.
Related concepts
- volumekind of · A volume is a logical storage resource that provides capacity for storing and accessing data, often by making it available to an operating system or application.
- ephemeral volumecontrasts with · An ephemeral volume is a Kubernetes volume whose storage is created for and automatically removed with its consuming workload.
- access modecontrasts with · An access mode is a persistent-storage policy specifying how and by how many nodes or Pods a volume may be mounted for reading and writing.
- init containerused by · An init container is a Kubernetes Pod container that performs initialization work to completion before the Pod’s application containers start.
- image volumealternative to · An image volume is a Kubernetes volume that exposes the files from an OCI image to containers in the same pod, typically as read-only content.
- poduses · A Kubernetes Pod is the smallest deployable unit in Kubernetes, grouping one or more co-located containers that share networking and other resources.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


