Scenario
A worker node experiences disk pressure due to low disk space, causing pods to be evicted and stuck in Pending state.
Symptoms
kubectl get nodesshows node conditionDiskPressure- Evicted pods show status
Pending;kubectl describe podreveals0/1 nodes are available: 1 node had taint {node.kubernetes.io/disk-pressure: } kubectl get events -n <namespace>showsEvictedevents
Diagnosis
- Check node conditions:
bash kubectl describe node <node-name> | grep -A5 ConditionsLook forDiskPressureset toTrue. - SSH into the node and inspect disk usage:
bash ssh <node-ip> df -hIdentify partitions near 100% (commonly/var/lib/dockeror/var/lib/kubelet). - Optional: Use
kubectl top nodesto check overall resource pressure.
Risk Controls
- Stop scheduling: Cordon the node immediately to prevent new pods.
bash kubectl cordon <node-name> - Drain workloads: If recovery is not immediate, safely evict all non-daemonset pods:
bash kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-dataSafety note:--delete-emptydir-dataremoves emptyDir data; ensure it's backed up or disposable. - Preserve system pods: DaemonSet pods (e.g., kube-proxy) remain, node basic functions stay intact.
Recovery Actions
- Free disk space:
- Remove unused container images:
docker image prune -a(requires node access) - Truncate container logs:truncate -s 0 /var/lib/docker/containers/*/*-json.log- Clean kubelet logs:journalctl --vacuum-size=500M - Verify pressure relief:
bash kubectl describe node <node-name> | grep -A5 ConditionsConfirmDiskPressureisFalse.
Rollback
- Re-enable scheduling:
bash kubectl uncordon <node-name> - Restore evicted pods: Usually automatic via controllers; if not, manually scale:
bash kubectl scale deployment <deployment-name> --replicas=<original-count> - Verify pod status:
bash kubectl get pods -o wide | grep <node-name>Ensure pods are Running and not re-evicted.
Verification
- Node health: Re-check node conditions –
DiskPressureshould beFalse,Readynormal. - Pod status: All pods should be
RunningorCompleted. - Cluster events:
kubectl get events --all-namespacesshows no abnormal evictions or errors. - Business metrics: Confirm application latency, error rates, etc., have returned to baseline.
When to Submit an OpsGlobal Ticket
- Automated recovery fails: Node disk pressure persists despite steps above.
- Multiple nodes affected: Two or more worker nodes show similar pressure, possibly indicating a storage issue.
- Data loss concern: Critical data lost due to eviction (e.g., need persistent volume recovery).
- Cluster-level impact: Control plane nodes also under pressure, or API server being slow.
When creating the ticket, include: node name, event timestamps, output of kubectl describe node, and disk usage screenshots.
Use cases
Useful for teams handling Kubernetes issues and needing a clear troubleshooting and delivery workflow.
Problem background
This article walks through a real-world Kubernetes incident where a node faces disk pressure, covering symptom identification, diagnosis, commands, risk controls, rollback, verification, and criteria for OpsGlobal ticket submission.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.