Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Node Pools aren't being set w/ automatic node repair, node updates, or Autoscaling #26

@lesv

Description

@lesv

My input:

module "gke-cluster" {
  source = "google-terraform-modules/kubernetes-engine/google"
  version = "1.19.1"

  general = {
    name = "${var.cluster_name}"
    env  = "${var.environment}"
    zone = "${var.gcp_zone}"
  }

  master = {
    enable_kubernetes_alpha = true
    username = "admin"
    password = "${random_string.password.result}"
  }

  default_node_pool = {
    node_count = 3
    machine_type = "${var.node_machine_type}"
    disk_size_gb = "${var.node_disk_size}"
    disk_type = "pd-ssd"
    oauth_scopes =   "https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management,https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/pubsub,https://www.googleapis.com/auth/datastore"

#    autoscaling {   ## I've tried with both this, and this commented out.
#      min_node_count = 1
#      max_node_count = 10
#    }

#    management {  ##  DEFAULTS to TRUE so it should just work, but it's not on 10/30pm
#     auto_repair = true
#     auto_upgrade= true
#    }
  }

  node_pool = []
}

I get:
screen shot 2018-10-30 at 10 46 52 pm

With things commented out looking in terraform.tfstate:

                "google_container_cluster.new_container_cluster": {
                    "type": "google_container_cluster",
                    "depends_on": [
                        "data.google_container_engine_versions.region",
                        "local.name_prefix"
                    ],
                    "primary": {
                        "id": "knative-dev-us-west1-c-master",
                        "attributes": {
 .
 .
 .
                            "id": "knative-dev-us-west1-c-master",
 .
 .
 .
                            "name": "knative-dev-us-west1-c-master",
 .
 .
 .
                            "node_pool.#": "1",
                            "node_pool.0.autoscaling.#": "0",
                            "node_pool.0.initial_node_count": "3",
                            "node_pool.0.instance_group_urls.#": "1",
                            "node_pool.0.instance_group_urls.0": "https://www.googleapis.com/compute/v1/projects/lesv-008/zones/us-west1-c/instanceGroupManagers/gke-knative-dev-us-west1-default-pool-68956134-grp",
                            "node_pool.0.management.#": "1",
                            "node_pool.0.management.0.auto_repair": "false",
                            "node_pool.0.management.0.auto_upgrade": "false",
                            "node_pool.0.max_pods_per_node": "0",
                            "node_pool.0.name": "default-pool",
 .
 .
 ;

I would expect to either set it, or following the comments in the code get that as the default, will look again in the AM incase of operator error, as I'm very much a nube w/ terraform, GKE, and kNative. (Though I've built several clusters by hand)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions