Cloud Native & eBPF

Kubernetes enforces cgroup v2 migration starting with v1.35

Key Takeaway

Kubernetes is deprecating cgroup v1, with version 1.35 defaulting to a configuration that prevents the kubelet from starting on cgroup v1 nodes.

Summary

Kubernetes is transitioning to cgroup v2 to leverage improved resource isolation and modern management features. Starting with Kubernetes v1.35, the failCgroupV1 setting defaults to true, meaning kubelet will fail to start on nodes using cgroup v1 unless manually overridden. This move follows the maintenance mode status of cgroup v1 support initiated in version 1.31.

Technical implications of the cgroup v2 shift

  • Memory QoS: Kubernetes v1.36 introduces tiered memory protection (memory.min and memory.low) available only on cgroup v2.
  • OOM Handling: On cgroup v2, kubelet sets memory.oom.group so that an OOM event kills all processes in a container simultaneously.
  • Resource Scaling: In-place Pod vertical scaling is stable in v1.35 and enabled by default as Beta in v1.36.
  • Pressure Stall Information (PSI): Kubelet exposes PSI for CPU, memory, and I/O contention, which requires cgroup v2 and Linux 4.20+.
  • CPU Weight: OCI runtimes like crun v1.23 and runc v1.3.2 implement non-linear conversion from cgroup v1 cpu.shares to cgroup v2 cpu.weight.

Why it matters

Administrators must migrate Linux nodes to cgroup v2 before upgrading to Kubernetes v1.35 or later to avoid cluster startup failures.

Original reference: kubernetes.io →