JuniorKubernetes

What is the difference between resource requests and limits, and what happens when a pod exceeds them?

What they are really testing: Whether you understand that requests drive scheduling and limits cap usage, and the asymmetry between CPU (throttled) and memory (OOMKilled). This drives both stability and cost.

A real interview question

What is the difference between resource requests and limits, and what happens when a pod exceeds them?

What most people say

drag me

Requests are the minimum resources and limits are the maximum, and the pod stays within them.

It misses what each is actually for (requests drive scheduling) and the critical asymmetry: CPU over-limit is throttled but memory over-limit is killed. That difference is exactly what causes mysterious OOMKills.

The follow-ups they ask next

  • A container keeps getting OOMKilled. What do you check?

    Its memory limit versus actual usage: the app exceeded the limit (or has a leak). Raise the limit to match real usage, or fix the leak; unlike CPU, memory over-limit is killed, not throttled.

  • How do requests affect cost and bin-packing?

    The scheduler reserves the requested amount, so inflated requests reserve capacity nobody uses, forcing more nodes and higher cost. Right-sizing requests to real usage improves bin-packing and cuts spend.

What the interviewer is listening for

  • Requests drive scheduling, limits cap usage
  • Knows CPU throttled vs memory OOMKilled
  • Mentions QoS/eviction and right-sizing for cost

What sinks the answer

  • "Min and max, pod stays within"
  • Thinks CPU overage kills the pod
  • Unaware memory overage is OOMKill

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

A request is [what the pod is guaranteed and what the scheduler places on], a limit is [the runtime cap]. On overage: [CPU is throttled (slowed), memory is OOMKilled (cannot be reclaimed)]. They set [the QoS class and eviction order]. So I [size requests from real usage: too low risks eviction, too high wastes money].

Keep going with kubernetes

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free