在使用以下 terraform 代码时,我如何知道我使用的是区域还是区域?我想要 Zonal,因为 GCP 在使用 Zonal GKE 集群时不收取 GKE Management fees
费用。
但我不确定以下是区域还是区域?
resource "google_container_cluster" "primary" {
name = "my-gke-cluster"
network = "default"
location = "europe-west1"
initial_node_count = 1
}
答案 0 :(得分:3)
Google Kubernetes Engine 将区域定义为多区域。对于区域,它由字母表表示,例如 a
、b
、c
。
所以,这里是位置的示例。
europe-west1
、us-west1
等europe-west1-b
、us-west1-a
等在您的 terraform 模块中,如果您想要区域 GKE 集群,则如下所示。
resource "google_container_cluster" "primary" {
name = "zonal-cluster"
network = "default"
location = "europe-west1-b"
initial_node_count = 1
}