devops10 min read

Migrating to cgroup v2 in Kubernetes: What You Need to Know

17 similar posts
  • Kubernetes
  • kubeadm
  • kubelet
  • containerd
  • CRI-O
  • crun
  • runc
  • Cilium

AI Summary

This article details the transition from cgroup v1 to cgroup v2 in Kubernetes. It covers architectural improvements, deprecation timelines starting in Kubernetes v1.31 and v1.35, kernel requirements, and features unlocked by cgroup v2 such as Memory QoS, eBPF integration, Pressure Stall Information (PSI), and in-place pod vertical scaling.

Key Takeaways

  • cgroup v1 has been deprecated, with failCgroupV1 defaulting to true in Kubernetes v1.35 and complete removal planned for v1.38.
  • Requires Linux kernel versions (recommended minimum 5.8 or higher) and updated OCI runtimes such as crun and runc for correct weight conversions.
  • Enables advanced features including Pressure Stall Information (PSI), tiered memory protection, and in-place pod vertical scaling.

Why it matters

As Kubernetes deprecates and removes cgroup v1 support, cluster operators and software engineers must migrate their Linux nodes to cgroup v2. Understanding this transition is critical for maintaining container resource isolation, avoiding startup failures in newer Kubernetes versions, and leveraging advanced features like Memory QoS and PSI metrics.

Conversation0

What would you add from your experience?

Checking your session…

Every good conversation starts with one perspective.