You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**NOTE**: This value will also be the value applied to the compute nodes of your custer.
61
62
62
-
From here you would take one of these values and set the `kubernets_version` variable in your tfvars files like this:
63
+
To set the exact version for your cluster, you would take one of these values and set the `kubernetes_version` variable in your tfvars files like so:
63
64
64
-
```bash
65
-
kubernetes_version = "1.18.15-gke.1102"
65
+
```terraform
66
+
kubernetes_version = "1.24.9-gke.3200"
66
67
```
67
68
68
69
Do not set the `kubernetes_channel` variable.
69
70
70
71
**NOTE**: If you find that the version you would like to use in your kubernetes cluster is not listed, you will need to go the [Channel Based](#channel-based) section to find the desired version.
71
72
73
+
### Aliased Versions
74
+
75
+
Only applicable in the "version based" scenario (omitting `kubernetes_channel` or setting it to "UNSPECIFIED"), Google supports the use of [aliased versions](https://cloud.google.com/kubernetes-engine/versioning#specifying_cluster_version) when creating your kubernetes cluster. The format required looks like:
76
+
77
+
* 1.X
78
+
* Specifies the highest valid patch+gke.N patch release in the 1.X minor version
79
+
* 1.X.Y
80
+
* Specifies the highest valid gke.N patch in the 1.X.Y patch release.
81
+
82
+
83
+
**Example: 1.X Format**
84
+
85
+
In your tfvars you would set the `kubernetes_version` variable in like so:
86
+
87
+
```terraform
88
+
kubernetes_version = "1.24"
89
+
```
90
+
91
+
Going by the list of versions from the output of the `gcloud container get-server-config` command above, this assignment results in a cluster being created with the version `1.24.9-gke.3200`, since Google chooses the "highest valid patch+gke.N patch release in the 1.24 minor version"
92
+
93
+
**Example: 1.X.Y Format**
94
+
95
+
In your tfvars you would set the `kubernetes_version` variable in like so:
96
+
97
+
```terraform
98
+
kubernetes_version = "1.23.15"
99
+
```
100
+
101
+
Going by the list of versions from the output of the `gcloud container get-server-config` command above, this assignment results in a cluster being created with the version `1.23.15-gke.1900`, since Google chooses the "highest valid gke.N patch in the 1.23.15 patch release."
102
+
103
+
72
104
## Channel Based
73
105
74
106
Setting a specific channel for your kubernetes cluster will use the `defaultVersion` provided by that channel. This is the only way to work with a version of kubernetes that has been recently released and/or is not listed in the [Version Based](#version-based) section.
0 commit comments