Menu

Cgroups: A Deep Dive into Resource Management in Kubernetes
📰

Cgroups: A Deep Dive into Resource Management in Kubernetes

Reading 0:00
15s threshold

You set CPU and memory requests and limits in a Kubernetes pod spec:

resources: requests: cpu: 500m memory: 256Mi limits: cpu: "1" memory: 512Mi

What happens next?

Kubernetes uses requests to schedule your pod, and CPU requests also decide your share of the CPU when the node is busy. On Linux, the kubelet and container runtime set up cgroups, and the kernel enforces the limits.

A CPU limit can throttle your workload. A memory limit can lead to an OOM kill when the container tries to use more than its limit and the kernel can’t reclaim enough memory. You can see the kernel’s side of the story in a few files on the node.

This three-part series follows the path from your pod spec to the kernel, with diagrams and hands-on labs:

🧱 Part 1: Foundations

https://nithinjohngeorge.com/blog/cgroups-deep-dive-kubernetes-part-1/

⚙️ Part 2: CPU

https://nithinjohngeorge.com/blog/cgroups-deep-dive-kubernetes-part-2/

🧠 Part 3:…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.