Member-only story

Understanding Kubernetes: Part 22 Kubernetes Resource Requests & Limits

techwithpatil
3 min readJan 30, 2025

--

📢 If you’ve been following our Kubernetes series 2025, welcome back! For new readers, check out Part 21: CNI

📖 Not a Medium member? No worries! Here’s the free link: Part 22 — Resource Requests & Limits

What are Resource Requests & Limits in Kubernetes?

In Kubernetes, resource requests and limits define how much CPU and memory a container can use. This ensures fair resource allocation among workloads and prevents any single pod from consuming excessive resources, which could impact other applications running in the cluster.

  • Requests: The minimum amount of CPU/memory guaranteed to a container. The scheduler uses this value to place the pod on a suitable node.
  • Limits: The maximum amount of CPU/memory a container can use. If a container exceeds this, Kubernetes restricts it (for CPU) or terminates it (for memory).

For example:

If you have a microservice that processes user requests, you can set CPU and memory requests to ensure it has enough resources to function and limits to prevent it from consuming excessive resources during traffic spikes.

Why Use Resource Requests & Limits?

--

--

techwithpatil
techwithpatil

Written by techwithpatil

DevOps & Site Realiability Interview | Cloud | AI Agent | Software Automation https://beacons.ai/techwithpatil

No responses yet