How do I tell if an existing cluster’s type is zonal or regional?

Viewed 592

I understand when I create one, I can define it to be single zone, multi zonal or regional and understand these can’t be changed after creation but would be good to know what type an existing cluster is. Is there anyway I to tell the type of cluster from the dashboard or using the gcloud sdk?

1 Answers

On GKE you can crate 3 types of clusters based on location.

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.

Easiest way is to check in your GKE dashboard, location of Cluster. enter image description here

Zonal Clusters have specified only one zone which in my case is us-central1-c.

Regional Clusters have specified Region which may contains many zones. In my case location is us-east1 without any -X.

When you are creating Regional Cluster you can also specify which zones should be added as default.

enter image description here

Also if you will go to your cluster details you can see different options.

Zone Cluster:

enter image description here

In zonal cluster your Master zone and default zone are the same.

Regional Cluster:

enter image description here

In regional cluster you have specified region and default zones which can be chose during cluster creation.

In short. On GKE Cluster Dashboard in your location if you have Region-Zone (us-central1-c, where us-central1 is region and -c is zone) its zonal. If you have only Region like us-east1 its Regional cluster.

If you would like use gcloud CLI

You can use gcloud container clusters list and check if location have specified zone like 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

You could also consider gcloud container describe <cluster-name> but you will need also specify if cluster is regional or zonal which it might be more like confirmation if it is regional or zonal cluster.

Related