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 |

0 commit comments

Comments
 (0)