Explain QoS classes and which pods get evicted first.
IntermediateScenarioResources, autoscaling and scheduling
Answer
Situation read → Under node memory pressure, important pods got killed before batch jobs.
What I'd do →
- Guaranteed: requests equal limits for CPU and memory in every container
- Burstable: at least one request or limit set
- BestEffort: none set
- Eviction order is BestEffort, then Burstable exceeding requests, then Guaranteed last
- Check with
kubectl get pod -o jsonpath='{.status.qosClass}'
Why → The kubelet ranks pods by QoS and usage over requests, and OOM scores follow the same ordering.
Interview tip → Mention system-node-critical priority for agents.
More on Resources, autoscaling and scheduling
How do you choose requests and limits for a new service?BeginnerPods are Pending with `0/6 nodes are available: 6 Insufficient cpu`. What do you do?IntermediateCPU limits cause latency spikes though average usage is low. Why and what is the fix?IntermediateHow do you configure an HPA on CPU?BeginnerHPA shows `<unknown>/70%` for CPU. What do you do?IntermediateYou need to scale on queue length or requests per second, not CPU. How?Intermediate