简体   繁体   中英

Google Cloud GKE multi-zone cluster vs regional clusters

Anyone know difference between those two? For now only difference I see is that regional require >= 3 zones.

Found good explanation here

A "multi-zonal" cluster is a zonal cluster with at least one additional zone defined; in a multi-zonal cluster, the cluster master is only present in a single zone while nodes are present in each of the primary zone and the node locations. In contrast, in a regional cluster, cluster master nodes are present in multiple zones in the region. For that reason, regional clusters should be preferred.

Compute Engine resources are hosted in multiple locations worldwide. These locations are composed of regions and zones. A region is a specific geographical location where you can host your resources. Each region has one or more zones; most regions have three or more zones. For example, the us-west1 region denotes a region on the west coast of the United States that has three zones: us-west1-a , us-west1-b , and us-west1-c .

Very detailed information about Regions, Zones, Locations can be found on GCP Documentation . You can find there also what Features (CPU, Machine types, Discs, etc.) are available in each region.

Informations regarding Multi-Zone and Regional Clusters with information how create/modify them can be found here .

1. Zonal/Multi-Zone Clusters By default, a cluster is created in a single compute zone. A multi-zone cluster runs nodes in multiple zones within the same region. All nodes in a single-zone or multi-zone cluster are controlled by the same cluster master.

Multi-zone clusters can help improve the availability of your applications by running them on nodes across multiple zones. This helps protect against downtime in the unlikely event of a zone-wide outage.

2. Regional clusters Regional clusters distribute Kubernetes resources across multiple zones within a region. Regional cluster create three cluster masters across three zones and, by default, create nodes in three zones, or in as many zones as desired.

Also keep in mind, that if you will choose closest region to your location, you will have a bit quicker response.

From the GKE documentation:

By default, a cluster is created in a single compute zone. A multi-zone cluster runs nodes in multiple zones within the same region. All nodes in a single-zone or multi-zone cluster are controlled by the same cluster master.

For Regional GKE clusters:

Regional clusters distribute Kubernetes resources across multiple zones within a region. A regional cluster's masters and nodes are spread across multiple zones. The default number of masters, default number of nodes per zone, and default number of zones included are all three, but you can reduce or increase the number to achieve the appropriate cluster size and number of zones.

I have recently built a regional GKE bootstrapper and the challenges of managing regional storage are tremendous (for me of course). As said in the documentation, a read-write persistent disk cannot be attached to multiple nodes. If your Statefulset tries to schedule a pod in a node without the Persistent Volume, you will face issues like 1 node(s) had volume node affinity conflict . It is totally possible to overcome these challenges with taints and node afinity strategy but this comes with a lot of maturity of Kubernetes Administration.

Also, have in mind that traffic between zones are charged and if you don't have extreme control over the architechture details, you will ended up paying way more than you have planned:

Additionally, you are charged for node-to-node traffic across zones. For example, if you had a service in one zone that needed to talk to a service in another zone, you would be charged for the cross-zone network traffic. For more information, refer to the "Egress between zones in the same region (per GB)" pricing on the Compute Engine pricing page.

As a personal/small professional setup, I would recommend sticking with multi-zone cluster and use the capability of multizone disks.

As per Google's documentation (Dated 30-Oct-2020)

Zonal Cluster: By default, a cluster's control plane (master) and nodes all run in a single compute zone that you specify when you create the cluster.

Multi-Zonal Cluster: When you select multi zones to create Nodes while creating GKE cluster, it becomes multi-zone cluster. Though cluster's control plane (master) will run in a single zone and nodes will span across multiple compute zones.

Regional clusters: This increase the availability of both a cluster's control plane (master) and its nodes by replicating them across multiple zones of a region. This provides the advantages of multi-zonal clusters, with the following additional benefits:

  1. If one or more (but not all) zones in a region experience an outage, the cluster's control plane remains accessible as long as one replica of the control plane remains available.
  2. List item During cluster maintenance such as a cluster upgrade, only on replica of the control plane is unavailable at a time, and the cluster is still operational.

For regional cluster, by default, the control plane and each node pool is replicated across three zones of a region, but you can customize the number of replicas.

You cannot modify whether a cluster is zonal, multi-zonal, or regional after creating the cluster.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM