From 8dbd6d54a03513ddf9f710c4af5db4e0b0eef71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Thu, 20 Jan 2022 11:49:28 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Add=20warning=20about=20initial?= =?UTF-8?q?=5Fnode=5Fcount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/terraform/nodepools-gke.md | 40 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/slides/terraform/nodepools-gke.md b/slides/terraform/nodepools-gke.md index 33f21cc0..a40d107e 100644 --- a/slides/terraform/nodepools-gke.md +++ b/slides/terraform/nodepools-gke.md @@ -71,24 +71,6 @@ resource "google_container_cluster" "mycluster" { --- -## Our normal node pool - -```tf -resource "google_container_node_pool" "ondemand" { - name = "ondemand" - cluster = google_container_cluster.mycluster.id - autoscaling { - min_node_count = 0 - max_node_count = 5 - } - node_config { - preemptible = false - } -} -``` - ---- - ## Our preemptible node pool ```tf @@ -108,6 +90,24 @@ resource "google_container_node_pool" "preemptible" { --- +## Our normal node pool + +```tf +resource "google_container_node_pool" "ondemand" { + name = "ondemand" + cluster = google_container_cluster.mycluster.id + autoscaling { + min_node_count = 0 + max_node_count = 5 + } + node_config { + preemptible = false + } +} +``` + +--- + ## Scale to zero - It is possible to scale a single node pool to zero @@ -122,6 +122,10 @@ resource "google_container_node_pool" "preemptible" { - Make sure that at least one pool has at least one node! +⚠️ Make sure to set `initial_node_count` to more than zero + +⚠️ Setting `min_node_count` is not enough! + --- ## Taints and labels