← All notes

Kubernetes LimitRange sets default and min/max CPU and memory per container in a namespace

Answer: Create a LimitRange in the namespace with default, defaultRequest, min and max for type: Container. A LimitRange is a policy that constrains the limits and requests you can specify for each object kind, such as Pod or PersistentVolumeClaim, in a namespace.

Example

apiVersion: v1
kind: LimitRange
metadata:
  name: cpu-resource-constraint
spec:
  limits:
  - type: Container
    default:
      cpu: 500m
    defaultRequest:
      cpu: 500m
    max:
      cpu: "1"
    min:
      cpu: 100m

What it can enforce

Admission rules

Why use it

By default, containers run with unbounded compute resources. A ResourceQuota caps the namespace total, while a LimitRange makes sure a single object cannot monopolize all available resources within the namespace and fills in defaults that quotas require.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Limit Ranges; kubernetes/website (GitHub), limit-range.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Limit Ranges; kubernetes/website (GitHub), limit-range.md (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.

Cite this

Permanent ID: iil:note:1pcqqnqk

iinventedlight. 2026. "Kubernetes LimitRange sets default and min/max CPU and memory per container in a namespace." iinventedlight Library, iil:note:1pcqqnqk, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-limit-ranges/. License: CC-BY-4.0.

@misc{iil_note_1pcqqnqk,
  author = {{iinventedlight}},
  title = {{Kubernetes LimitRange sets default and min/max CPU and memory per container in a namespace}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/kubernetes-limit-ranges/},
  note = {Permanent ID iil:note:1pcqqnqk. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-limit-ranges.md.