LimitRange and ResourceQuota affect scheduling, runtime behavior, and cluster capacity planning. You’ll learn how the scheduler uses these values to place pods, what happens when containers exceed their limits, and recommended practices for production clusters.
Every node advertises an amount of CPU and memory. Each pod (more precisely, each container in a pod) can declare requests and limits. The scheduler uses requests to decide where to place pods. Once a pod is scheduled, requested resources are reserved for scheduling decisions and contribute to a container’s QoS classification.
If a pod requests 2 CPUs and 1Gi of memory, the scheduler will only place it on a node with at least those available resources. If no node meets the requirements, the pod will remain in Pending and kubectl describe pod will show events such as “Insufficient cpu” or “Insufficient memory”.

Specifying Resource Requests
Add aresources section to the container spec with requests to specify the minimum CPU and memory the container requires:
4Gi of memory and 2 CPUs. The scheduler will place the pod only on a node that has those resources available; after scheduling, those requests influence QoS and eviction ranking.
CPU and Memory Units
- CPU:
- Fractional values allowed (e.g.,
0.1CPU). 100mequals0.1CPU; the smallest accepted unit is1m.1CPU typically maps to 1 vCPU or 1 core (provider-dependent).
- Fractional values allowed (e.g.,
- Memory:
- Use unit suffixes like
Ki,Mi,Gior decimalK,M,G. Gi= 1024^3 bytes;G= 1000^3 bytes.
- Use unit suffixes like
When to use limits
Setting requests ensures scheduling guarantees. To cap runtime consumption, add limits.
- Without limits, a container can consume any available resources on the node (which may starve other pods).
- With limits, CPU is throttled and memory overuse causes termination (OOM).

requests and limits.
What happens when a container exceeds its limit?
- CPU: the CFS scheduler throttles the container; it will not get more CPU cycles than the limit.
- Memory: memory cannot be throttled. If a container exceeds its memory limit, the kernel may OOM-kill the process and the pod will be terminated.


Default configuration and common scenarios
By default, Kubernetes does not requirerequests or limits. Omitting them can cause noisy neighbors or unpredictable scheduling. The table below summarizes common combinations and their effects:

Always set sensible resource
requests for production workloads so the scheduler can place pods correctly. Use limits when you need to prevent runaway usage (e.g., multi-tenant clusters). If you want safe defaults or namespace restrictions, use LimitRange and ResourceQuota.On shared clusters, omitting requests or limits may lead to unfair resource usage and evictions. Enforce namespace policies with
LimitRange and ResourceQuota.QoS classes (brief)
QoS classes influence eviction priority and are derived from requests/limits per pod:- Guaranteed: every container has CPU and memory requests equal to limits.
- Burstable: at least one container has a request but not all request==limit.
- BestEffort: no requests or limits specified.
LimitRanges — defaults and min/max at namespace level
Use aLimitRange to provide defaults or enforce min/max values for containers in a namespace. LimitRange affects pods created or updated after it is applied.
Example LimitRange (CPU and memory):
defaultapplies when a container has no explicitlimit.defaultRequestapplies when a container has no explicitrequest.min/maxrestrict values for containers in the namespace.- Existing pods are not retroactively changed when a
LimitRangeis added.
ResourceQuota — namespace aggregate limits
ResourceQuota enforces hard caps on the total resource consumption within a namespace, limiting aggregate requests and limits.

ResourceQuota:
4 CPUs and requested memory to 4Gi. It also limits total limits to 10 CPUs and 10Gi.
Practical tips
- Always set at least
requestsfor production workloads to avoid scheduling surprises. - Use
limitsto prevent noisy-neighbor problems in multi-tenant clusters. - Apply
LimitRangeto ensure consistent defaults and enforce min/max per namespace. - Apply
ResourceQuotato enforce team-level resource budgets and prevent runaway consumption. - Monitor throttling and OOM events (
kubectl describe pod, kubelet logs, and metrics) to tune requests and limits.
- Requests affect scheduling and guarantees.
- Limits cap runtime usage (CPU throttled; memory OOM).
LimitRangeprovides namespace defaults and constraints.ResourceQuotaenforces namespace-level aggregate limits.
- Kubernetes: Manage Resources for Containers — https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Kubernetes Quality of Service (QoS) — https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/