# PodEviction: The node had condition: [DiskPressure].

- **ID:** `cloud/azure-aks-pod-eviction-disk-pressure`
- **Domain:** cloud
- **Category:** resource_error
- **Error Code:** `DiskPressure`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

AKS node's local disk usage exceeds 85% threshold, triggering kubelet to evict pods to free space, often due to container logs, images, or emptyDir volumes filling up the OS disk.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| AKS 1.28 | active | — | — |
| AKS 1.29 | active | — | — |
| Kubernetes 1.27 | active | — | — |
| Azure Linux Node Image 2024 | active | — | — |

## Workarounds

1. **Evict pods gracefully and clean up unused container images on the node: `kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data`, then SSH into node and run `docker system prune -a --force` or `nerdctl system prune -a --force` (depending on container runtime). Uncordon node: `kubectl uncordon <node-name>`.** (85% success)
   ```
   Evict pods gracefully and clean up unused container images on the node: `kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data`, then SSH into node and run `docker system prune -a --force` or `nerdctl system prune -a --force` (depending on container runtime). Uncordon node: `kubectl uncordon <node-name>`.
   ```
2. **Configure log rotation for container logs by setting up a DaemonSet with fluent-bit or filebeat to ship logs and limit local storage, or adjust kubelet config: `--container-log-max-size=10Mi --container-log-max-files=3`.** (90% success)
   ```
   Configure log rotation for container logs by setting up a DaemonSet with fluent-bit or filebeat to ship logs and limit local storage, or adjust kubelet config: `--container-log-max-size=10Mi --container-log-max-files=3`.
   ```

## Dead Ends

- **** — Pods are recreated by controllers and the node remains under DiskPressure, causing immediate re-eviction. (95% fail)
- **** — New nodes may also fill up quickly if the root cause (e.g., log rotation misconfiguration) is not fixed; existing node remains under pressure. (80% fail)
- **** — Restarting kubelet does not free disk space; it only temporarily resets the pressure condition until usage rechecked. (90% fail)
