← All notes

Kubernetes emptyDir volumes - scratch space, Memory medium and sizeLimit

Answer: When a Pod defines an emptyDir volume, Kubernetes creates that volume as the Pod is assigned to a node. The emptyDir volume is initially empty. When a Pod is removed from a node, the data in the emptyDir is deleted permanently.

Example

apiVersion: v1
kind: Pod
metadata:
  name: cache
spec:
  containers:
  - name: app
    image: example/app
    volumeMounts:
    - mountPath: /cache
      name: cache
  volumes:
  - name: cache
    emptyDir:
      medium: Memory
      sizeLimit: 256Mi

Behavior

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Volume Types; kubernetes/website (GitHub), volume-types.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Volume Types; kubernetes/website (GitHub), volume-types.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.

Cite this

Permanent ID: iil:note:618bx875

iinventedlight. 2026. "Kubernetes emptyDir volumes - scratch space, Memory medium and sizeLimit." iinventedlight Library, iil:note:618bx875, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-emptydir/. License: CC-BY-4.0.

@misc{iil_note_618bx875,
  author = {{iinventedlight}},
  title = {{Kubernetes emptyDir volumes - scratch space, Memory medium and sizeLimit}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/kubernetes-emptydir/},
  note = {Permanent ID iil:note:618bx875. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-emptydir.md.