IntermediateLesson 13 of 35
Requests, limits and QoS
How much CPU and memory a pod needs, and what happens when it exceeds it.
yaml
resources:
requests: { cpu: 250m, memory: 256Mi } # used for scheduling
limits: { cpu: 500m, memory: 512Mi } # enforced at runtime- Requests reserve capacity; the scheduler only places a pod where requests fit.
- Exceeding the CPU limit throttles the container; exceeding the memory limit kills it (
OOMKilled). - QoS classes follow from this: Guaranteed (requests = limits), Burstable, BestEffort. Under pressure BestEffort pods are evicted first.
250m means 250 millicores, a quarter of a CPU.