How to fix emptyDir volume size limit exceeded, pod evicted in Kubernetes

KubernetesBEGINNERMEDIUMUpdated Dec 6, 2025ยท 157 views

Pod emptyDir volume exceeds sizeLimit. Fix by increasing limit, reducing data written, or using persistent volume.

Quick fix

Fixes EMPTYDIR_LIMIT_EXCEEDED

kubectl get pod -n <namespace> <pod-name> -o yaml | grep -A 5 emptyDir
  1. Check emptyDir configuration
  2. Increase sizeLimit
  3. Reduce data written
  4. Use persistent volume for large data
kubernetes โ€” error
kubectl get pod -n <namespace> <pod-name> -o yaml | grep -A 5 emptyDir
emptyDir volume size limit exceeded, pod evicted

What this error means

emptyDir volumes can fill up quickly if applications write logs or temporary files. When limit is exceeded, pod is evicted.

Typical symptoms

  • Pod OOMKilled or evicted
  • Container status unknown after limit hit
  • Write operations start failing
  • Pod becomes unstable

Common causes

  1. Application writing too much data
  2. sizeLimit set too low
  3. Logs not being rotated
  4. Temporary files accumulating

How to fix "emptyDir volume size limit exceeded, pod evicted"

1Check emptyDir configuration
bash
kubectl get pod -n <namespace> <pod-name> -o yaml | grep -A 5 emptyDir
2Increase sizeLimit
yaml
volumes:
- name: tmp
  emptyDir:
    sizeLimit: 500Mi  # Increased
3Reduce data written

Configure log rotation and cleanup.

4Use persistent volume for large data

Use PVC for data exceeding emptyDir limits.

5Monitor usage
bash
kubectl exec -n <namespace> <pod-name> -- df -h /tmp

Advanced notes

emptyDir with medium: Memory defaults to 50% of node memory.

Frequently asked questions

What does "EMPTYDIR_LIMIT_EXCEEDED" mean?
emptyDir volumes can fill up quickly if applications write logs or temporary files. When limit is exceeded, pod is evicted.
How do I fix "EMPTYDIR_LIMIT_EXCEEDED"?
Pod emptyDir volume exceeds sizeLimit. Fix by increasing limit, reducing data written, or using persistent volume.
What causes "EMPTYDIR_LIMIT_EXCEEDED"?
Application writing too much data sizeLimit set too low Logs not being rotated
Is the "EMPTYDIR_LIMIT_EXCEEDED" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading