Knowledgebase

Kubernetes Resource Requests and Limits Print

  • 0

Telling the scheduler what you need.

WHAT A REQUEST IS

The amount guaranteed to the container.

WHAT A LIMIT IS

The maximum it may use.

WHAT THE SCHEDULER USES

Requests, to decide where a pod fits.

WHAT HAPPENS WITH NO REQUESTS

Scheduling is guesswork, and nodes become overcommitted.

WHAT HAPPENS WHEN MEMORY EXCEEDS ITS LIMIT

The container is terminated.

WHAT HAPPENS WHEN PROCESSOR EXCEEDS ITS LIMIT

It is throttled, not terminated.

WHY THAT DIFFERENCE MATTERS

Memory limits kill; processor limits slow.

WHAT THAT ARGUES FOR

Setting memory limits with headroom, and being cautious with processor limits.

WHY CAUTIOUS WITH PROCESSOR

Aggressive throttling causes latency that is difficult to diagnose.

HOW TO CHOOSE VALUES

Measure actual usage under realistic load.

WHAT NOT TO DO

Copy values from an example Set limits far above requests everywhere

WHY THAT SECOND POINT

It produces nodes that appear to have room and do not.

WHAT QUALITY OF SERVICE MEANS

How the system prioritises pods when a node is under pressure.

WHAT IS EVICTED FIRST

Pods with no requests, then those exceeding them.

WHAT TO SET FOR ANYTHING IMPORTANT

Requests equal to limits.

WHY

It gives the strongest guarantee.

WHAT TO REVIEW

Actual usage against configured values, periodically.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot