- The difference between resource requests and limits.
- How to configure requests and limits sensibly.
- How Kubernetes assigns QoS classes from those settings.
- The eviction order under memory pressure.
- A practical workflow for right-sizing.



- The scheduler makes poor placement decisions because it only sees the (incorrect) numbers you provided.
- Pods get evicted unpredictably when nodes experience resource pressure.
- Nodes either become starved (leading to instability) or sit idle (wasting money).

- Set sensible default CPU and memory requests so the scheduler can make intelligent placement decisions.
- Enforce maximum resource consumption per namespace using ResourceQuota.
- Require memory limits (and reasonable CPU limits) so runaway containers can’t destabilize a node.
- Continuously right-size using real usage metrics and metrics-driven adjustments.
- It is treated as claiming zero resources for scheduling, so it may be scheduled on already busy nodes.
- It is placed in the BestEffort QoS class, making it the first candidate for eviction under pressure.
- Without limits a runaway container can monopolize resources and OOM other containers.

- QoS classes are derived from container-level resource requests and limits.
- Classes: BestEffort, Burstable, Guaranteed.
- Under memory pressure the eviction preference is: BestEffort → Burstable → Guaranteed.
Within the same QoS class Kubernetes uses additional signals to decide which Pods to evict: Pod priority, recent resource usage, and cluster-configured eviction thresholds.
Practical enforcement tools: use
LimitRange to set default requests/limits per namespace and ResourceQuota to cap total resource consumption for a namespace. These prevent accidental overprovisioning and unbounded resource usage.- Use conservative requests that reflect the typical steady-state usage.
- Use limits to bound maximum consumption, especially for memory.
requestsdrive scheduling decisions. Choose values that let the scheduler pack pods efficiently and avoid unnecessary node creation.limitsprevent a container from growing without bound and destabilizing nodes. Memory limits are especially important because memory is not easily reclaimed.
- Start with conservative requests based on historical metrics (use monitoring systems like Prometheus, Datadog).
- Deploy with those requests and safe limits, enforce via LimitRange.
- Observe real CPU and memory usage over a representative period (days to weeks).
- Adjust requests toward the 95th percentile of observed steady usage; adjust limits to a safe headroom (e.g., 1.5–2× expected memory need depending on application characteristics).
- Iterate: repeat observation and tuning periodically, or automate with a resource recommender.
- Setting requests equal to peak observed usage: this leads to bad packability and overspending.
- Omitting memory limits: increases the risk of node-wide OOMs.
- Using BestEffort for production services: too fragile under real-world load spikes.
Memory is unforgiving: if a container exceeds node memory, Kubernetes may OOMKill Pods unpredictably. Always require memory limits for production workloads.
- Kubernetes Concepts: Resources and Limits
- LimitRange - Kubernetes
- ResourceQuota - Kubernetes
- Cluster Autoscaler