gpt4 book ai didi

kubernetes - 如何判断现有集群的类型是区域还是区域?

转载 作者:行者123 更新时间:2023-12-02 11:42:23 25 4
gpt4 key购买 nike

我知道当我创建一个时,我可以将它定义为单区域、多区域或区域,并且了解这些在创建后无法更改,但最好知道现有集群是什么类型。
无论如何我可以从仪表板或使用 gcloud sdk 告诉集群的类型吗?

最佳答案

在 GKE 上,您可以打包 3 types of clusters基于位置。
Single-zone clusters

A single-zone cluster has a single control plane (master) running in one zone. This control plane manages workloads on nodes running in the same zone.


Multi-zonal clusters

A multi-zonal cluster has a single replica of the control plane running in a single zone, and has nodes running in multiple zones. During an upgrade of the cluster or an outage of the zone where the control plane runs, workloads still run. However, the cluster, its nodes, and its workloads cannot be configured until the control plane is available. Multi-zonal clusters balance availability and cost for consistent workloads. If you want to maintain availability and the number of your nodes and node pools are changing frequently, consider using a regional cluster.


Regional clusters

A regional cluster has multiple replicas of the control plane, running in multiple zones within a given region. Nodes also run in each zone where a replica of the control plane runs. Because a regional cluster replicates the control plane and nodes, it consumes more Compute Engine resources than a similar single-zone or multi-zonal cluster.


最简单的方法是检查您的 GKE 信息中心, location的集群。
enter image description here Zonal Clusters只指定了一个 zone在我的情况下是 us-central1-c . Regional Clusters已指定 Region其中可能包含许多区域。就我而言,位置是 us-east1没有任何 -X .
创建时 Regional Cluster您还可以指定哪个 zones应该添加为默认值。
enter image description here
此外,如果您将转到集群详细信息,您可以看到不同的选项。 Zone Cluster :
enter image description here
zonal cluster您的 Master zonedefault zone是相同的。 Regional Cluster :
enter image description here
regional cluster您已指定 regiondefault zones可以在集群创建期间选择。
简而言之。如果您有 Region-Zone,请在您所在位置的 GKE 集群控制面板上(us-central1-c,其中 us-central1region-czone)它的区域。
如果您只有 Region喜欢 us-east1它的 Regional cluster .
如果您想使用 gcloud CLI
您可以使用 gcloud container clusters list并检查是否 location已指定 zone喜欢 region-a , region-b , region-c .
$ gcloud container clusters list
NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS
zonal-1 us-central1-c 1.14.10-gke.36 35.194.45.10 n1-standard-1 1.14.10-gke.36 3 RUNNING
cluster-1 us-east1 1.14.10-gke.36 34.75.147.33 n1-standard-1 1.14.10-gke.36 9 RUNNING
你也可以考虑 gcloud container describe <cluster-name>但您还需要指定集群是否为 regionalzonal如果是 regional 可能更像是确认或 zonal簇。

关于kubernetes - 如何判断现有集群的类型是区域还是区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62701096/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com