ResourceQuota vs LimitRange

Both bound resources. Different scopes.

ResourceQuota

ResourceQuota is the namespace-level cap. It aggregates CPU, memory, pod count, and PVC count across every pod in the namespace, and refuses admission when the sum would exceed the cap. Its job is to protect cluster capacity from any single namespace running away.

LimitRange

LimitRange is the per-pod constraint. It sets defaults and maximum bounds for individual pods or containers, and acts as a safety net when pod specs forget to declare requests and limits. Its job is per-pod sanity, not aggregate capacity.

Layer them

The two together provide layered protection: LimitRange enforces per-pod sanity, ResourceQuota enforces namespace-level fairness. Either one alone leaves an exploitable gap.

Operating discipline

Both objects need to live in IaC and get reviewed quarterly. Setting them at namespace creation is cheap; retrofitting them after a runaway workload is expensive.