【发布时间】:2020-12-19 18:29:48
【问题描述】:
我的 GKE 集群存在缩减问题,发现通过正确的配置我可以解决这个问题。
作为 terraform documentation 我可以使用参数 autoscaling_profile 并将其设置为 OPTIMIZE_UTILIZATION
像这样:
resource "google_container_cluster" "k8s_cluster" {
[...]
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
}
}
}
但是我收到了这个错误:
错误:modules/gke/main.tf 第 70 行,资源“google_container_cluster”“k8s_cluster”中的参数不受支持: 70: autoscaling_profile = "OPTIMIZE_UTILIZATION"
此处不应使用名为“autoscaling_profile”的参数。
我不明白?
【问题讨论】:
标签: terraform google-kubernetes-engine