A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/kubernetes-engine/docs/how-to/migrate-cgroupv2 below:

Migrate nodes to Linux cgroupv2 | Google Kubernetes Engine (GKE)

Migrate nodes to Linux cgroupv2

Stay organized with collections Save and categorize content based on your preferences.

Starting with version 1.33, Google Kubernetes Engine (GKE) migrates clusters running cgroupv1 to cgroupv2. This page instructs you how to do the following:

You can skip reading this page if you know that your workloads run as expected on cgroupv2, or aren't impacted by cgroup mode configuration. GKE automatically migrates clusters running cgroupv1 to cgroupv2 with version 1.33 and later.

About Linux control groups

The kubelet and the container runtime use Linux kernel control groups (cgroups) for resource management, such as limiting how much CPU or memory each container in a Pod can access. There are two modes of the cgroup subsystem in the kernel: cgroupv1 and cgroupv2. Kubernetes support for cgroupv2 was introduced as alpha in Kubernetes version 1.18, beta in 1.22, and GA in 1.25. For more details, refer to the Kubernetes cgroups v2 documentation.

To learn about configuring a cgroup mode for Standard clusters, see Linux cgroup mode configuration options.

How GKE is transitioning to cgroupv2

Review the following timeline to understand how GKE is transitioning existing clusters to use cgroupv2:

For approximate timing of automatic upgrades to later minor versions such as 1.31 and 1.33, see the Estimated schedule for release channels.

Before you begin

Before you start, make sure that you have performed the following tasks:

Check the cgroup mode of cluster nodes

The default cgroup mode depends on the type of cluster or node pool, and the version. With version 1.26 or later, the default is cgroupv2. With version 1.25 or earlier, the default is cgroupv1:

To check the cgroup mode, follow the instructions based on your cluster mode.

Autopilot

Run the following command:

gcloud container clusters describe CLUSTER_NAME \
    --format='value(nodePools[0].config.effectiveCgroupMode)'

Replace CLUSTER_NAME with the name of your cluster.

If the output is EFFECTIVE_CGROUP_MODE_V2, the cluster is running on cgroupv2. If the output is EFFECTIVE_CGROUP_MODE_V1, the cluster is running on cgroupv1.

GKE Autopilot clusters that were initially created with GKE version 1.25 or earlier run cgroupv1 until you migrate them.

Standard

With GKE Standard clusters, the cgroup mode is set at the node pool level. To check the mode for individual node pools, follow the instructions to Verify cgroup configuration. If your cluster's nodes are already using cgroupv2, no further action is necessary.

Migrate nodes to cgroupv2

We recommend that you migrate existing nodes before GKE automatically migrates them in version 1.33 or later.

Do the following steps to migrate nodes running cgroupv1:

  1. Check the cgroup mode of the nodes. If your cluster's nodes are already using cgroupv2, no further action is necessary.
  2. Review the considerations about the migration, Migrating to cgroup v2, to ensure that your workloads are prepared to use the new version of the API.
  3. Migrate the nodes for your cluster.

    Note: When you run these commands to update the cgroup mode, GKE updates the nodes using the surge upgrade strategy. GKE initiates these operations to update node pools or groups of Autopilot nodes immediately in a sequential order without respecting maintenance policies configured for the cluster. Autopilot

    Explicitly set your cluster's nodes to use cgroupv2:

    gcloud container clusters update CLUSTER_NAME \
        --autoprovisioning-cgroup-mode=v2
    

    Replace CLUSTER_NAME with the name of your cluster.

    Standard
    1. If you use node auto-provisioning for the cluster, run the following command to ensure that existing and future node pools created with node auto-provisioning use cgroupv2:

      gcloud container clusters update CLUSTER_NAME \
          --autoprovisioning-cgroup-mode=v2
      

      Replace CLUSTER_NAME with the name of your cluster.

    2. For existing node pools created without node auto-provisioning, update the node pool to add the following to the node system configuration:

      linuxConfig:
        cgroupMode: 'CGROUP_MODE_V2'
      

      To learn more, see Customizing node system configuration.

      When you manually create new node pools without node auto-provisioning, GKE uses cgroupv2 by default.

Temporarily opt out of automatic migration to cgroupv2

To temporarily avoid automatic migration of nodes running cgroupv1 to cgroupv2 with minor versions 1.33 and later, you must explicitly set cgroupv1. You can also use these instructions to temporarily revert to cgroupv1 if migrating nodes to cgroupv2 caused an issue for your cluster's workloads.

Note: When you run these commands to update the cgroup mode, GKE updates the nodes using the surge upgrade strategy. GKE initiates these operations to update node pools or groups of Autopilot nodes immediately in a sequential order without respecting maintenance policies configured for the cluster. Autopilot

Run the following command for clusters that you originally created using version 1.25 or earlier. If your cluster was created running version 1.26 or later, you can't set the cgroup mode to cgroupv1.

Explicitly set your cluster's nodes to use cgroupv1:

gcloud container clusters update CLUSTER_NAME \
    --autoprovisioning-cgroup-mode=v1

Replace CLUSTER_NAME with the name of your cluster.

Standard

To continue to run cgroupv1 with a GKE Standard cluster node pool running version 1.33 or later, do the following steps:

  1. If you use node auto-provisioning, and your cluster was created running version 1.25 or earlier, use the following command to ensure that existing and future node pools created with node auto-provisioning use cgroupv1. If your cluster was created running version 1.26 or later, you can't set the cgroup mode to cgroupv1:

    gcloud container clusters update CLUSTER_NAME \
        --autoprovisioning-cgroup-mode=v1
    

    Replace CLUSTER_NAME with the name of your cluster.

  2. For existing Standard node pools, update the node pool to add the following to the node system configuration:

    linuxConfig:
      cgroupMode: 'CGROUP_MODE_V1'
    

    You must also set this node configuration for new node pools that you manually create without node auto-provisioning.

    To learn more, see Customizing node system configuration.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-12 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4