We're trying to migrate our GKE Autopilot cluster from cgroupv1
to cgroupv2
following the official documentation (https://cloud.google.com/kubernetes-engine/docs/how-to/migrate-cgroupv2#autopilot_1), but we're encountering an error.
Cluster Details:
europe-west2
1.31.6-gke.1064001
EFFECTIVE_CGROUP_MODE_V1
cos-117-18613-164-38
Steps Taken:
Verified the current cgroup
mode using: gcloud container clusters describe development --format='value(nodePools[0].config.effectiveCgroupMode)' --region=europe-west2
which returned EFFECTIVE_CGROUP_MODE_V1
Followed the documentation to update the cluster using: gcloud container clusters update <CLUSTER_NAME> --autoprovisioning-cgroup-mode=v2 --region=europe-west2
Received error: ERROR: (gcloud.container.clusters.update) ResponseError: code=400, message=INVALID_ARGUMENT: invalid node_pool_auto_config.linux_node_config. Allowed fields are: ["cgroup_mode"]
We've tried to update gcloud
CLI to the latest version, with the same results.
We couldn't find anything online related to this.
Any ideas?
You are encountering the error ERROR: (gcloud.container.clusters.update) ResponseError: code=400, message=INVALID\_ARGUMENT: invalid node\_pool\_auto\_config.linux\_node\_config. Allowed fields are: ["cgroup\_mode"]
as there is an existing bug in GKE that prevents upgrading Autopilot clusters to cgroupv2
. A fix is already expected to be in production within approximately two weeks. You can check the GKE Release Notes page from time to time for updates.
In the meantime, as a workaround, since your cluster was created with GKE version 1.31, you can also try upgrading your GKE version to at least 1.33 to enable the migration to cgroupv2
automatically. However, as per documentation, manual migration of cgroup modes is not supported in Autopilot clusters. If you can't wait for the next release in two weeks, you have the option to create a new Autopilot cluster with an updated version and migrate your workloads to it.