Difference between revisions of "Cluster autoscaling"
Jump to navigation
Jump to search
Line 59: | Line 59: | ||
== See also == | == See also == | ||
− | * {{tf | + | * {{tf GKE}} |
* {{GKE}} | * {{GKE}} | ||
[[Category:Terraform]] | [[Category:Terraform]] |
Revision as of 09:12, 1 November 2022
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#
Contents
Example
cluster_autoscaling { enabled = true autoscaling_profile = "OPTIMIZE_UTILIZATION" resource_limits { resource_type = "cpu" minimum = 1 maximum = 4 } resource_limits { resource_type = "memory" minimum = 4 maximum = 16 } Ref: https://stackoverflow.com/a/63684343
autoscaling_profile: [ BALANCED | OPTIMIZE_UTILIZATION ]
Incomplete example, resource_limits
are mandatory:
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
Activities
See also
- Deploy GKE cluster using Terraform,
addons_config, gke.tf, google_container_cluster, google_container_node_pool
- GKE, GKE Autopilot,
gcloud container, gke-gcloud-auth-plugin
, GKE release channels, GKE Ingress, GCP Node logs, GCP Node logs severity Error, GKE roles, Provide access to GKE cluster, Deploy GKE cluster using Terraform,cluster_autoscaling, addons_config, GKE Node Pool
, node auto-provisioning
Advertising: