Help Center/ Cloud Container Engine/ User Guide/ Nodes/ Node O&M/ Migrating Nodes to cgroup v2
Updated on 2026-06-16 GMT+08:00

Migrating Nodes to cgroup v2

Kubernetes officially graduated cgroup v2 support to GA in v1.25. cgroup v2 provides a unified hierarchy, strong resource management, and compatibility with future Kubernetes features. Migrate nodes to OS versions with cgroup v2 enabled.

cgroup Versions

The Linux kernel provides cgroup v1 and cgroup v2. kubelet and the underlying container runtime use cgroup to manage pod and container resources, including CPU and memory requests and limits. As the next-generation interface, cgroup v2 addresses the fragmented controller hierarchy and management complexity of cgroup v1 through a unified structure. It offers improved resource management, more stable isolation, and introduces Pressure Stall Information (PSI) for enhanced support of future Kubernetes features. The two versions differ in kernel interfaces and filesystem structures. Applications that directly access the cgroup filesystem must be adapted accordingly.

cgroup Version Compatibility

cgroup v2 and cgroup v1 differ in filesystem structure and parameter naming. Applications that directly read cgroup paths must be verified and adapted for cgroup v2 compatibility.

Upgrade or verify the following applications and components for cgroup v2 compatibility:

  • Third-party monitoring and security agents, as well as custom scripts that read cgroup files, depend on the cgroup filesystem. Upgrade related applications to versions that explicitly support cgroup v2. Review and modify custom scripts to accommodate cgroup v2 path changes, as existing logic may fail due to filesystem structure differences.
  • cAdvisor deployed as a DaemonSet for pod and container monitoring must be upgraded to v0.43.0 or later.
  • For Java applications, use the following versions:

    OpenJDK/HotSpot: jdk8u372, 11.0.16, 15, or later

    IBM Semeru Runtimes: 8.0.382.0, 11.0.20.0, 17.0.8.0, or later

    IBM Java: 8.0.8.6 or later

  • If you use the uber-go/automaxprocs package, upgrade it to version 1.5.1 or later.

Checking Node's cgroup Version

  1. Log in to the node.
  2. Check the node's cgroup version.

    stat -fc %T /sys/fs/cgroup/
    • For cgroup v2, the output is cgroup2fs.
    • For cgroup v1, the output is tmpfs.

Identifying a CCE Node's cgroup Version

For nodes running cgroup v2, CCE adds the cce.io/cgroupVersion: v2 label and displays the node's cgroup version in the node list.

Procedure

The cgroup version of a CCE cluster node is determined by the node OS. To migrate to cgroup v2, reset the node to an OS that supports cgroup v2. (In CCE, the default OS with cgroup v2 enabled is Ubuntu 22.04.cgroup2.) For more details about, see Resetting a Node.