Project challenges / verified progress
Beacon: give it somewhere to live

The engineering notebook

Budget the machine

How does Kubernetes decide where Beacon fits and what happens when it uses too much?

Loading statusStage 7 of 10

  • Workspace not ready
  • Agent not ready
Focus25:00
A small focus ritual

0 focus sessions completed. Every fourth session offers a longer break. Start each phase when you are ready.

Study time never unlocks verified lesson progress.

Loading...

Loading verified progress...

Loading GitHub account...
Phase 3 — Share machines and keep state

Step 01 of 06

Learn the concept

A cluster is just someone else's finite machine, even when the someone is your laptop. Resource settings are how Beacon stops pretending it is the only process with plans.

ONE POD, THREE CLASSESRequests limitscpu and memory setGuaranteedrequest equals limitlast evictedBurstablesome request setnormal choiceBestEffortno requests setfirst evicted
QoS class comes from requests and limits. It influences eviction order under pressure, but it does not make an overloaded process magically fast.
Step 01

The ideas this is made of

Requests are scheduling promises

A resource request says how much CPU or memory Kubernetes should reserve when choosing a node. The scheduler sums requests, not live usage. If Beacon requests 128Mi memory, the scheduler looks for a node with that much unrequested memory. This prevents overpacking by wishful thinking, but only if you set requests that resemble reality.

Limits are enforcement, and CPU enforcement is weird

A memory limit is a hard ceiling: exceed it and the kernel can kill the container with OOMKilled. A CPU limit is enforced through CFS quota, which throttles execution during a period. That can add latency to a service that had spare CPU bursts available. Many teams set CPU requests but omit CPU limits for latency-sensitive services.

QoS class affects eviction priority

Kubernetes assigns Guaranteed, Burstable or BestEffort based on requests and limits. Under node pressure, BestEffort Pods are easiest to evict, then Burstable Pods exceeding requests, then Guaranteed Pods. QoS is not a performance tier. It is a survival hint when the node is out of memory or disk.

Pending and OOMKilled name different resource failures

A Pod stuck Pending with Unschedulable failed before running: the scheduler could not find room for its requests or constraints. A Pod with last state OOMKilled did run and exceeded its memory limit. Debug them differently. For Pending, read scheduling Events. For OOMKilled, inspect container state and memory settings.

A desk reservation is not a handcuff
request: reserve one desk
limit: lock worker to one desk forever
burst: use empty desks during lunch
pressure: send unreserved people home first

Requests help placement. Limits enforce ceilings. CPU ceilings can punish useful bursts, while memory ceilings prevent one process from eating the room.

Requests and limits

FieldUsed byFailure smell

CPU request

Scheduler, shares

Pending if too high

CPU limit

Kernel CFS quota

Throttled latency

Memory request

Scheduler, eviction

Evicted under pressure

Memory limit

Kernel OOM killer

OOMKilled

No values

BestEffort QoS

First evicted

What these are called on the job

  • Request — The amount of CPU or memory the scheduler uses when placing a Pod.

  • Limit — The maximum resource use enforced by the node for a container.

  • OOMKilled — Container termination because it exceeded memory limits or node memory pressure.

  • QoS class — Kubernetes classification derived from requests and limits, used during eviction decisions.