---
# System prepended metadata

title: GKE v1.23 Upgrade & Prep for v1.24

---

# GKE v1.23 Upgrade & Prep for v1.24

1. Manually upgrade all clusters to _at least_ `1.22` through the GCP console. Nodes do not have to be upgraded at this time.

1. In Terraform, find all references to the `nextgen-gke` module and update their version constraints to the latest `1.20.x` patch release:

    ```hcl
    source  = "terraform.mlbinfra.net/<BU>/nextgen-gke/google"
    version = "~> 1.20.3"
    ```

1. Find the `google` and `google-beta` provider requirements and update them to the latest `3.x` minor release:

    ```hcl
    terraform {
      required_providers {
        google = {
          source  = "hashicorp/google"
          version = "~> 3.90"
        }

        google-beta = {
          source  = "hashicorp/google-beta"
          version = "~> 3.90"
        }

        ...
    ```

1. If any `min_gke_version_prefix` are specified, delete them.

1. Commit and push as a new branch/pull request.

1. The Terraform plan from the PR should show _at least_ the following change:

    ```shell
    ~ node_config {
      ~ image_type        = "COS" -> "COS_CONTAINERD"
    ```

    but may also include changes _similar to_:

    ```shell
    ~ resource "google_container_cluster" "main_cluster" {
      ~ enable_shielded_nodes       = false -> true
      ~ min_master_version          = "1.22.x-gke.yyyy" -> "1.23.x-gke.yyyy"
    ```

    **As always, pay close attention to any unexpected changes, especially if they involve non-GKE resources.**

1. Merge the PR and apply the Terraform plan. This will take some time, during which pods will move as nodes are replaced. If the apply times out, wait for any ongoing operations to end, then start a new plan and apply it.

1. Once a cluster is upgraded to `1.23`, manually upgrade its node pool(s) to the same version through the GCP console.

1. **Before Opening Day 2023:** Manually upgrade all clusters and nodes to `1.24`.
