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- Check emptyDir configuration
- Increase sizeLimit
- Reduce data written
- Use persistent volume for large data
kubernetes โ error
kubectl get pod -n <namespace> <pod-name> -o yaml | grep -A 5 emptyDiremptyDir 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
- Application writing too much data
- sizeLimit set too low
- Logs not being rotated
- 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 emptyDir2Increase sizeLimit
yaml
volumes:
- name: tmp
emptyDir:
sizeLimit: 500Mi # Increased3Reduce 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 /tmpAdvanced 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
- ๐Kubernetes Official Documentation
- ๐Volumes - Kubernetes Docs(Official Docs)