Google Distributed Cloud software-only on VMware version 1.35 requires cgroup v2. As of version 1.35, Kubernetes no longer supports cgroup v1. This document explains how to migrate your clusters to cgroup v2.
Before you begin
To install or upgrade Google Distributed Cloud software-only on VMware with Kubernetes 1.35, check the following:
- Verify software version: You must use Google Distributed Cloud software-only on VMware version 1.35.00 or later.
- OS cgroup v2 compatibility: You must use an operating system that supports cgroup v2.
- Configure cgroup v2 (if required): If your OS doesn't default to cgroup v2 (for example, Ubuntu 18.04/20.04), you must configure it manually. For more information, see Migrating to cgroup v2 in the Kubernetes documentation.
- Update Cluster Configuration: Change the
osImageTypefield fromubuntu,ubuntu_containerd, orcosto eitherubuntu_cgv2orcos_cgv2before upgrading to version 1.35. - Prepare vSphere Images: Run
gkectl prepareif images are missing from vSphere. - Update Automation Scripts: Review and update any automation scripts to use
the new
ubuntu_cgv2orcos_cgv2image types.
Update OS image type
Before you run gkectl upgrade, change the osImageType to a
cgroup v2 compatible image in your cluster YAML file.
Admin cluster
- Open your admin cluster configuration file.
- Locate the
osImageTypefield. - Change the value to
ubuntu_cgv2(if you use Ubuntu) orcos_cgv2(if you use COS).
For more information about this field, see documentation for osImageType.
User cluster
- Open your user cluster configuration file.
- Locate the
osImageTypefield within thenodePoolssection. - Change the value to
ubuntu_cgv2(if you use Ubuntu) orcos_cgv2(if you use COS).
For more information about this field, see documentation for nodePools[i].osImageType.
Upgrade your cluster
After updating the osImageType in your configuration file, upgrade your
cluster.
Run the following command to upgrade your cluster:
gkectl upgrade cluster --config USER_CLUSTER_CONFIG --admin-config ADMIN_CLUSTER_CONFIGReplace
USER_CLUSTER_CONFIGwith the path to your user cluster configuration file. ReplaceADMIN_CLUSTER_CONFIGwith the path to your admin cluster configuration file.
Preflight checks
GKE on VMware 1.35 does not support the ubuntu, ubuntu_containerd, and cos
OS image types. If you attempt to create or upgrade a cluster or node pool with
these image types, the system blocks the request during preflight checks.
New default OS image type
The default osImageType for GKE on VMware 1.35 is ubuntu_cgv2.
If you create a new cluster configuration and leave the osImageType field
blank, the system deploys nodes with cgroup v2 enabled by default.
If you prefer Container-Optimized OS (COS) over Ubuntu, explicitly set the
osImageType field to cos_cgv2 in your configuration file.
What's next
- Update the Admin cluster configuration file
osImageTypefield. - Update the User cluster configuration file
osImageTypefield in node pools. - Learn more about upgrading GKE on VMware clusters.