DELAPARRA
Index
Color
NL
Category: Kubernetes

limits

Explained by Updated

What is limits?

limits: The hard cap on CPU/memory a container may use. Exceeding the memory limit gets the container OOM-killed; CPU is throttled, not killed. Limits set the maximum CPU and memory a container in Kubernetes may use. A container that exceeds its memory limit is killed, shown as OOMKilled. Exceeding the CPU limit does not kill it; the container is throttled and simply runs slower.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about limits

How is limits used in practice?

Limits protect the rest of the node. Without them, one container with a memory leak can starve every other application on the same machine.

What should you keep in mind with limits?

Set the memory limit with real usage in mind, plus headroom for peaks. A limit that is too tight causes random restarts under load. For CPU, many teams set requests but leave limits off or generous, because throttling can cause latency spikes that are hard to diagnose. Watch for OOMKilled in kubectl describe pod; it is a clear sign the memory limit needs attention.

What does an example of limits look like?

resources: limits: cpu: "500m" memory: "512Mi"

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with L

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.