all notes

Kubernetes requests vs limits: stop guessing

5 min readKubernetesSRE

Copy-pasting requests and limits from an old Helm chart is how clusters develop trust issues. Requests decide scheduling; limits decide who gets throttled or killed. Confuse them and you get pods that schedule fine but die under load.

The mental model

  • requests = what the scheduler reserves for you (guaranteed floor)
  • limits = the ceiling; exceeding CPU gets throttled, exceeding memory gets OOMKilled
  • Memory limit ≈ 2x average usage is a decent starting point; CPU limits often cause more harm than good

yaml

resources:
  requests:
    cpu: 100m
    memory: 256Mi
  limits:
    memory: 512Mi

Measure first with something like Prometheus + kube-state-metrics for a week before setting anything. Numbers copied from a Medium post in 2021 are not capacity planning.