简体   繁体   English

Google Cloud Kubernetes - 如何创建区域或区域 GKE 集群?

[英]Google Cloud Kubernetes - How to create Zonal or Regional GKE cluster?

How do I know if I'm using Zonal or Regional when using the following terraform code?使用以下 terraform 代码时,我如何知道我使用的是区域性还是区域性? I want Zonal since GCP doesn't charge GKE Management fees when using Zonal GKE cluster.我想要 Zonal,因为 GCP 在使用 Zonal GKE 集群时不收取GKE Management fees

But I'm not sure if the following is Zonal or Regional?但我不确定以下是区域性的还是区域性的?

resource "google_container_cluster" "primary" {
  name     = "my-gke-cluster"
  network            = "default"
  location               = "europe-west1"
  initial_node_count = 1
  }

Google Kubernetes Engine defines the regional as multiple-zonal. Google Kubernetes 引擎将区域定义为多区域。 For a zone, it is indicated by an alphabet, like a , b , c .对于区域,它由字母表示,例如abc

So, here are the examples for the location.因此,以下是该位置的示例。

  • Regional/Multiple-zonal: europe-west1 , us-west1 , etc.区域/多区域: europe-west1us-west1等。
  • Zonal: europe-west1-b , us-west1-a , etc.区域: europe-west1-bus-west1-a等。

In your terraform module, if you want to have zonal GKE cluster, it looks like this.在您的 terraform 模块中,如果您想拥有区域性 GKE 集群,它看起来像这样。

resource "google_container_cluster" "primary" {
  name               = "zonal-cluster"
  network            = "default"
  location           = "europe-west1-b"
  initial_node_count = 1
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Terraform:如何使用命名空间在Google Cloud(GKE)上创建Kubernetes集群? - Terraform: How to create a Kubernetes cluster on Google Cloud (GKE) with namespaces? 如何使用多个 Google Kubernetes Engine (GKE) 集群制作多区域 Kafka/Zookeeper 集群? - How to make a multi-regional Kafka/Zookeeper cluster using multiple Google Kubernetes Engine (GKE) clusters? Google Cloud GKE 多专区集群与区域集群 - Google Cloud GKE multi-zone cluster vs regional clusters 如何将kubernetes事件从GKE集群传播到谷歌云日志 - How to propagate kubernetes events from a GKE cluster to google cloud log 如何使用自定义图像在 Ansible 中创建 Google Kubernetes (GKE) 集群? - How to create Google Kubernetes (GKE) cluster in Ansible with custom image? 如何删除Google Kubernetes集群中的GPU(GKE) - How to remove GPU in Google Kubernetes cluster (GKE) 如何判断现有集群的类型是区域性的还是区域性的? - How do I tell if an existing cluster’s type is zonal or regional? 在 Google Cloud Function 中对 GKE 集群的 Kubernetes API 进行身份验证 - Authentication to Kubernetes API of GKE cluster within Google Cloud Function Kubernetes:是否可以在 GKE 区域集群中获取主节点 IP/名称 - Kubernetes: Is it possible to get master nodes IP/Name in GKE regional cluster 如何在 Ansible 中检索已创建的 Google Kubernetes (GKE) 集群的凭据? - How to retrieve credentials of a created Google Kubernetes (GKE) cluster in Ansible?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM