CONTAINERS / A CONCEPT NOTE

Resource Requests & Limits

sharing a node politely

~65 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

Requests are the minimum CPU/Memory guaranteed to a container. Limits are the absolute maximum resources a container is permitted to consume before getting throttled or killed.

02 / FOLLOW THE MECHANISM

How resources conflicts occur

  1. Request spec

    pod specifies request: 1 CPU, 2GB RAM. Scheduler guarantees this capacity.

  2. Spike activity

    app consumes more CPU, crossing requests but staying under limits.

  3. Memory Leak

    container memory usage hits the hard limits boundary.

  4. OOM Kill

    orchestrator kills the container instantly with OOMKilled to protect node stability.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

view real-time CPU/Memory usage of active pods

kubectl top pod

EXAMPLE 02 · REFERENCE

see resource allocations and allocations percentage

kubectl describe node NODE_NAME

Explore command anatomy in the CLI lab