Q: What are the three QoS classes in Kubernetes and how does each affect eviction?
1. Guaranteed — requests == limits for all containers. Both CPU and memory. Highest priority. Evicted last.
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: "In one of our high-traffic production clusters, our SRE team handled this incident using a standardized runbook. 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."
Initial Diagnostics & Root Cause Analysis
When a node runs out of memory, kubelet evicts pods in this order: BestEffort → Burstable (lowest priority score first) → Guaranteed.
- Guaranteed —
requests == limitsfor all containers. Both CPU and memory. Highest priority. Evicted last. - Burstable — at least one container has requests < limits, or not all containers have both set. Medium priority.
- BestEffort — no requests or limits set at all. Lowest priority. Evicted first when node is under memory pressure.
Remediation & Permanent Safeguards
For critical production workloads: use Guaranteed QoS (set requests = limits for memory at minimum) to protect them from eviction.
- Guaranteed — requests == limits for all containers. Both CPU and memory. Highest priority. Evicte...
- Burstable — at least one container has requests < limits, or not all containers have both set. Me...
- BestEffort — no requests or limits set at all. Lowest priority. Evicted first when node is under ...
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 three classes Kubernetes 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 three classes Kubernetes
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 three classes Kubernetes
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 three classes Kubernetes Forced deletion bypasses kubelet cleanup and can cause multi-attach errors on PersistentVolumes (PVs) or split-brain on stateful workloads.