Difference between revisions of "Cluster autoscaling"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
 
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#  
 
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#  
 +
 +
https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/93#issuecomment-554397982
 +
 +
  cluster_autoscaling = {
 +
    enabled = true
 +
    resource_limits = {
 +
      max_cpu_cores = 20
 +
      min_cpu_cores = 5
 +
      max_memory_gb = 30
 +
      min_memory_gb = 10
 +
    }
 +
  }
 +
 +
 +
Incomplete example:
 
  cluster_autoscaling
 
  cluster_autoscaling
 
   cluster_autoscaling {
 
   cluster_autoscaling {

Revision as of 08:54, 1 November 2022

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#

https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/93#issuecomment-554397982

 cluster_autoscaling = {
   enabled = true
   resource_limits = {
     max_cpu_cores = 20
     min_cpu_cores = 5
     max_memory_gb = 30
     min_memory_gb = 10
   }
 }


Incomplete example:

cluster_autoscaling
  cluster_autoscaling {
    enabled = true
  }


Errors

google_container_cluster.primary: Modifying... [id=projects/your-project/locations/us-central1- a/clusters/your-project-gke]
╷
│ Error: googleapi: Error 400: Resource limits for cpu, memory must be specified when enabling node autoprovisioning., badRequest
│
│   with google_container_cluster.primary,
│   on gke.tf line 2, in resource "google_container_cluster" "primary":
│    2: resource "google_container_cluster" "primary" {
│
╵


╷
│ Error: Unsupported argument
│
│   on gke.tf line 15, in resource "google_container_cluster" "primary":
│   15:   cluster_autoscaling = true
│
│ An argument named "cluster_autoscaling" is not expected here. Did you mean to define a block of type "cluster_autoscaling"?
╵

Related

See also

Advertising: