Q: A pod is being scheduled and then immediately evicted. What's happening?
Node is under resource pressure. kubelet evicts lower-priority pods to free resources. Check: kubectl describe pod — reason will say Evicted with a reason (memory, disk).
Want to master this scenario in a live sandbox? KodeKloud's CKA & CKAD Hands-On Certification Track covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "When troubleshooting Kubernetes, I always follow a structured layered model: Pod status -> Events -> Logs -> Network. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix."
Production Solution & Architecture
Node is under resource pressure. kubelet evicts lower-priority pods to free resources. Check: kubectl describe pod — reason will say Evicted with a reason (memory, disk). Check node conditions: kubectl describe node — MemoryPressure, DiskPressure, PIDPressure. Fix: increase node size, add more nodes, reduce pod resource requests, clean up eviction-causing pressure (disk full, memory leak).
- Immediate Triage: Node is under resource pressure. kubelet evicts lower-priority pods to free resources. Check: k
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Restarting a crashing container without examining preceding termination logs via kubectl logs --previous when configuring scheduled immediately evicted Restarting the pod flushes ephemeral container runtime state, destroying vital panic stack traces and fatal initialization logs.
-
Misdiagnosing an application boot crash as a failure of aggressive liveness probes when configuring scheduled immediately evicted
Liveness probes with short timeouts or high failure thresholds kill slow-starting applications repeatedly, causing false
CrashLoopBackOffloops. -
Neglecting node taints, tolerations, and resource quotas when diagnosing pods stuck in Pending when configuring scheduled immediately evicted
Pods remain
Pendingwhen scheduler predicates fail;kubectl describe podreveals whether CPU/memory exhaustion or taints prevent placement. - Invoking kubectl delete pod --force --grace-period=0 indiscriminately on unready pods when configuring scheduled immediately evicted Forced deletion bypasses kubelet cleanup and can cause multi-attach errors on PersistentVolumes (PVs) or split-brain on stateful workloads.