DELAPARRA
Index
Color
NL
Category: Kubernetes

emptyDir

Explained by Updated

What is emptyDir?

emptyDir: A scratch volume created empty when a Pod starts and deleted when the Pod is removed. Good for caches and sharing files between containers in one Pod. An emptyDir is a temporary volume in Kubernetes. It is created empty when a pod starts and deleted when the pod is removed.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about emptyDir

How is emptyDir used in practice?

All containers in the same pod can use it, which makes it useful for sharing files between them, such as a sidecar that processes logs written by the main container. It also works as scratch space for caches, temporary uploads or build output.

What should you keep in mind with emptyDir?

Never store data you need to keep in an emptyDir. A pod can be rescheduled to another node at any time, and the volume goes with it. Set a sizeLimit so a runaway cache cannot fill the node's disk. For a faster cache in memory, medium: Memory uses RAM instead, which counts towards the container's memory limit.

What does an example of emptyDir look like?

volumes: - name: tmp emptyDir: sizeLimit: 500Mi

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with E

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.