Google Cloud GKE multi-zone cluster vs regional clusters

7/26/2019

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

-- abovesun
google-cloud-platform
google-kubernetes-engine
kubernetes

3 Answers

7/26/2019

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.

-- abovesun
Source: StackOverflow

7/26/2019

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.

-- PjoterS
Source: StackOverflow

9/4/2019

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.

-- Everton Arakaki
Source: StackOverflow