Skip to content

Latest commit

 

History

History
62 lines (53 loc) · 2.32 KB

upgrading_to_v24.0.md

File metadata and controls

62 lines (53 loc) · 2.32 KB

Upgrading to v24.0

The v24.0 release of kubernetes-engine is a backwards incompatible release.

master_global_access_enabled in GA private-cluster module

master_global_access is now supported in GA private-cluster module and defaults to true. To opt out, set master_global_access_enabled to false.

  module "gke" {
-   source           = "terraform-google-modules/kubernetes-engine/google//modules/private-cluster"
-   version          = "~> 23.0"
+   source           = "terraform-google-modules/kubernetes-engine/google//modules/private-cluster"
+   version          = "~> 24.0"
...
+   master_global_access_enabled  = false
}

Update variant random ID keepers updated

The v24.0 release updates the keepers for the update variant modules. This will force a recreation of the nodepools.

To avoid this, it is possible to edit the remote state of the random_id resource to add the new attributes.

  1. Perform a terraform plan as normal, identifying the random_id resources changing and the new max_pods_per_node and pod_range attributes
      ~ keepers     = { # forces replacement
          + "max_pods_per_node"           = ""
          + "pod_range"                   = ""
            # (19 unchanged elements hidden)
        }
        # (2 unchanged attributes hidden)
    }
  1. Pull the remote state locally: terraform state pull > default.tfstate
  2. Back up the original remote state: cp default.tfstate original.tfstate
  3. Edit the random_id resources to add in the new max_pods_per_node and pod_range attributes from the terraform plan step
"attributes": {
            "b64_std": "pool-02-vb4=",
            "b64_url": "pool-02-vb4",
            "byte_length": 2,
            "dec": "pool-02-48574",
            "hex": "pool-02-bdbe",
            "id": "vb4",
            "keepers": {
            ...
              "taints": "",
+             "max_pods_per_node": "",
+             "pod_range": ""
            },
            "prefix": "pool-02-"
          }
  1. Bump the serial number at the top
  2. Push the modified state to the remote terraform state push default.tfstate
  3. Confirm the random_id resource no longer changes (or the corresponding nodepool) in a terraform plan

Minimum Google Provider versions

Minimum Google Provider versions have been updated to 4.42.0.