Skip to content

Commit 1de41ef

Browse files
authored
feat: Changed default node pool machine type to e2-medium (#597)
BREAKING CHANGE: The default machine type has been changed to `e2-medium`. If you want the old default, you should specify it explicitly: `machine_type = "n1-standard-2"`.
1 parent ebdf57d commit 1de41ef

File tree

30 files changed

+35
-41
lines changed

30 files changed

+35
-41
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module "gke" {
3838
node_pools = [
3939
{
4040
name = "default-node-pool"
41-
machine_type = "n1-standard-2"
41+
machine_type = "e2-medium"
4242
min_count = 1
4343
max_count = 100
4444
local_ssd_count = 0
@@ -196,7 +196,7 @@ The node_pools variable takes the following parameters:
196196
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
197197
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
198198
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
199-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
199+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
200200
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
201201
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
202202
| name | The name of the node pool | | Required |

autogen/main/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module "gke" {
7878
node_pools = [
7979
{
8080
name = "default-node-pool"
81-
machine_type = "n1-standard-2"
81+
machine_type = "e2-medium"
8282
{% if beta_cluster %}
8383
node_locations = "us-central1-b,us-central1-c"
8484
{% endif %}
@@ -178,7 +178,7 @@ The node_pools variable takes the following parameters:
178178
| key | The key required for the taint | | Required |
179179
{% endif %}
180180
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
181-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
181+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
182182
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
183183
{% if beta_cluster %}
184184
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |

autogen/main/cluster.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ resource "google_container_node_pool" "pools" {
426426

427427
node_config {
428428
image_type = lookup(each.value, "image_type", "COS")
429-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
429+
machine_type = lookup(each.value, "machine_type", "e2-medium")
430430
labels = merge(
431431
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
432432
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ resource "google_container_node_pool" "pools" {
182182

183183
node_config {
184184
image_type = lookup(each.value, "image_type", "COS")
185-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
185+
machine_type = lookup(each.value, "machine_type", "e2-medium")
186186
labels = merge(
187187
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
188188
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

examples/node_pool/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ module "gke" {
4848
},
4949
{
5050
name = "pool-02"
51-
machine_type = "n1-standard-2"
5251
min_count = 1
5352
max_count = 2
5453
local_ssd_count = 0
@@ -65,7 +64,6 @@ module "gke" {
6564
node_locations = "${var.region}-b,${var.region}-c"
6665
autoscaling = false
6766
node_count = 2
68-
machine_type = "n1-standard-2"
6967
disk_type = "pd-standard"
7068
image_type = "COS"
7169
auto_upgrade = true

examples/node_pool_update_variant/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ module "gke" {
6363
},
6464
{
6565
name = "pool-02"
66-
machine_type = "n1-standard-2"
6766
min_count = 1
6867
max_count = 2
6968
disk_size_gb = 30

examples/node_pool_update_variant_beta/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ module "gke" {
6464
},
6565
{
6666
name = "pool-02"
67-
machine_type = "n1-standard-2"
6867
min_count = 1
6968
max_count = 2
7069
disk_size_gb = 30

examples/safer_cluster_iap_bastion/cluster.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ module "gke" {
3535
name = "safer-pool"
3636
min_count = 1
3737
max_count = 4
38-
machine_type = "n1-standard-2"
3938
auto_upgrade = true
4039
node_metadata = "GKE_METADATA_SERVER"
4140
}

examples/simple_regional_private/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ module "gke" {
5050
node_pools = [
5151
{
5252
name = "pool-01"
53-
machine_type = "n1-standard-2"
5453
min_count = 1
5554
max_count = 100
5655
local_ssd_count = 0

modules/beta-private-cluster-update-variant/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module "gke" {
6969
node_pools = [
7070
{
7171
name = "default-node-pool"
72-
machine_type = "n1-standard-2"
72+
machine_type = "e2-medium"
7373
node_locations = "us-central1-b,us-central1-c"
7474
min_count = 1
7575
max_count = 100
@@ -279,7 +279,7 @@ The node_pools variable takes the following parameters:
279279
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
280280
| key | The key required for the taint | | Required |
281281
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
282-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
282+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
283283
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
284284
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
285285
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ resource "google_container_node_pool" "pools" {
384384

385385
node_config {
386386
image_type = lookup(each.value, "image_type", "COS")
387-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
387+
machine_type = lookup(each.value, "machine_type", "e2-medium")
388388
labels = merge(
389389
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
390390
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

modules/beta-private-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module "gke" {
4747
node_pools = [
4848
{
4949
name = "default-node-pool"
50-
machine_type = "n1-standard-2"
50+
machine_type = "e2-medium"
5151
node_locations = "us-central1-b,us-central1-c"
5252
min_count = 1
5353
max_count = 100
@@ -257,7 +257,7 @@ The node_pools variable takes the following parameters:
257257
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
258258
| key | The key required for the taint | | Required |
259259
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
260-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
260+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
261261
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
262262
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
263263
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |

modules/beta-private-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ resource "google_container_node_pool" "pools" {
312312

313313
node_config {
314314
image_type = lookup(each.value, "image_type", "COS")
315-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
315+
machine_type = lookup(each.value, "machine_type", "e2-medium")
316316
labels = merge(
317317
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
318318
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

modules/beta-public-cluster-update-variant/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module "gke" {
6363
node_pools = [
6464
{
6565
name = "default-node-pool"
66-
machine_type = "n1-standard-2"
66+
machine_type = "e2-medium"
6767
node_locations = "us-central1-b,us-central1-c"
6868
min_count = 1
6969
max_count = 100
@@ -267,7 +267,7 @@ The node_pools variable takes the following parameters:
267267
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
268268
| key | The key required for the taint | | Required |
269269
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
270-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
270+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
271271
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
272272
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
273273
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ resource "google_container_node_pool" "pools" {
371371

372372
node_config {
373373
image_type = lookup(each.value, "image_type", "COS")
374-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
374+
machine_type = lookup(each.value, "machine_type", "e2-medium")
375375
labels = merge(
376376
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
377377
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

modules/beta-public-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module "gke" {
4141
node_pools = [
4242
{
4343
name = "default-node-pool"
44-
machine_type = "n1-standard-2"
44+
machine_type = "e2-medium"
4545
node_locations = "us-central1-b,us-central1-c"
4646
min_count = 1
4747
max_count = 100
@@ -245,7 +245,7 @@ The node_pools variable takes the following parameters:
245245
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
246246
| key | The key required for the taint | | Required |
247247
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
248-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
248+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
249249
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
250250
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
251251
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |

modules/beta-public-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ resource "google_container_node_pool" "pools" {
299299

300300
node_config {
301301
image_type = lookup(each.value, "image_type", "COS")
302-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
302+
machine_type = lookup(each.value, "machine_type", "e2-medium")
303303
labels = merge(
304304
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
305305
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

modules/private-cluster-update-variant/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module "gke" {
6666
node_pools = [
6767
{
6868
name = "default-node-pool"
69-
machine_type = "n1-standard-2"
69+
machine_type = "e2-medium"
7070
min_count = 1
7171
max_count = 100
7272
local_ssd_count = 0
@@ -230,7 +230,7 @@ The node_pools variable takes the following parameters:
230230
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
231231
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
232232
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
233-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
233+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
234234
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
235235
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
236236
| name | The name of the node pool | | Required |

modules/private-cluster-update-variant/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ resource "google_container_node_pool" "pools" {
267267

268268
node_config {
269269
image_type = lookup(each.value, "image_type", "COS")
270-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
270+
machine_type = lookup(each.value, "machine_type", "e2-medium")
271271
labels = merge(
272272
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
273273
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

modules/private-cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module "gke" {
4444
node_pools = [
4545
{
4646
name = "default-node-pool"
47-
machine_type = "n1-standard-2"
47+
machine_type = "e2-medium"
4848
min_count = 1
4949
max_count = 100
5050
local_ssd_count = 0
@@ -208,7 +208,7 @@ The node_pools variable takes the following parameters:
208208
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
209209
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
210210
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
211-
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
211+
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
212212
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
213213
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
214214
| name | The name of the node pool | | Required |

modules/private-cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ resource "google_container_node_pool" "pools" {
195195

196196
node_config {
197197
image_type = lookup(each.value, "image_type", "COS")
198-
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
198+
machine_type = lookup(each.value, "machine_type", "e2-medium")
199199
labels = merge(
200200
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
201201
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},

test/integration/beta_cluster/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
expect(node_pools).to include(
149149
including(
150150
"config" => including(
151-
"machineType" => "n1-standard-2",
151+
"machineType" => "e2-medium",
152152
),
153153
)
154154
)

test/integration/node_pool/controls/gcloud.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
including(
8080
"name" => "pool-01",
8181
"config" => including(
82-
"machineType" => "n1-standard-2",
82+
"machineType" => "e2-medium",
8383
),
8484
)
8585
)
@@ -190,7 +190,7 @@
190190
including(
191191
"name" => "pool-02",
192192
"config" => including(
193-
"machineType" => "n1-standard-2",
193+
"machineType" => "e2-medium",
194194
),
195195
)
196196
)
@@ -319,7 +319,7 @@
319319
including(
320320
"name" => "pool-03",
321321
"config" => including(
322-
"machineType" => "n1-standard-2",
322+
"machineType" => "e2-medium",
323323
),
324324
)
325325
)

test/integration/safer_cluster/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
expect(node_pools).to include(
125125
including(
126126
"config" => including(
127-
"machineType" => "n1-standard-2",
127+
"machineType" => "e2-medium",
128128
),
129129
)
130130
)

test/integration/simple_regional/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
expect(node_pools).to include(
105105
including(
106106
"config" => including(
107-
"machineType" => "n1-standard-2",
107+
"machineType" => "e2-medium",
108108
),
109109
)
110110
)

test/integration/simple_regional_private/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
expect(node_pools).to include(
111111
including(
112112
"config" => including(
113-
"machineType" => "n1-standard-2",
113+
"machineType" => "e2-medium",
114114
),
115115
)
116116
)

test/integration/simple_regional_with_kubeconfig/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
expect(node_pools).to include(
105105
including(
106106
"config" => including(
107-
"machineType" => "n1-standard-2",
107+
"machineType" => "e2-medium",
108108
),
109109
)
110110
)

test/integration/simple_regional_with_networking/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
expect(node_pools).to include(
105105
including(
106106
"config" => including(
107-
"machineType" => "n1-standard-2",
107+
"machineType" => "e2-medium",
108108
),
109109
)
110110
)

test/integration/simple_zonal/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
expect(node_pools).to include(
120120
including(
121121
"config" => including(
122-
"machineType" => "n1-standard-2",
122+
"machineType" => "e2-medium",
123123
),
124124
)
125125
)

test/integration/simple_zonal_private/controls/gcloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
expect(node_pools).to include(
111111
including(
112112
"config" => including(
113-
"machineType" => "n1-standard-2",
113+
"machineType" => "e2-medium",
114114
),
115115
)
116116
)

0 commit comments

Comments
 (0)