This page describes how to create regional clusters in Kubernetes Engine.
Regional clusters replicate three cluster masters across three zones in a
single region. For example, a regional cluster in the
creates masters and nodes in all three
us-east1-d. This ensures higher availability of resources
and protects clusters from zonal downtime, as regional clusters and their
resources do not fail if a single zone fails. In the event of an infrastructure
outage, the regional control plane remains available and nodes can be rebalanced
manually or using cluster autoscaler.
A regional cluster provides a single static endpoint for the entire cluster, providing you with the ability to access the cluster's control plane regardless of any outage or downtime in an individual zone.
There are several benefits to using regional clusters, including:
- Resilience from single zone failure. Because regional clusters are available across a region rather than a single zone within a region, if a single zone goes down, your Kubernetes control plane and your resources are not impacted.
- Zero downtime master upgrades and reduced downtime from master failures. By using a high availability control plane, your control plane’s availability is unaffected, even during upgrades.
You can choose to create zonal or regional clusters at the time of cluster creation. However, you cannot migrate or downgrade a zonal cluster to a regional cluster, and vice versa.
Regional clusters are offered at no additional charge during the beta period.
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 of the Compute Engine pricing page.
Creating a regional cluster
You can create a regional cluster by using the GCP Console or the
gcloud command-line tool.
By default, when a regional cluster is created, the cluster's node pools are replicated across three zones.
To create a regional cluster, perform the following steps:
To create a regional cluster, run the following command:
gcloud beta container clusters create [CLUSTER-NAME] --region=[REGION] [--node-locations=[ZONE, ZONE...]]
[CLUSTER-NAME] is the name you choose for the regional cluster, and
[REGION] is the desired region, such as
us-central1. For regions with
more than three zones or in cases where fewer zones is preferred, the
--node-locations flag overrides the default zones in which the
nodes are replicated.
For example, to create a regional cluster with nine nodes in
(three zones with three nodes each, which is default):
gcloud beta container clusters create my-regional-cluster --region=us-west1
To create a regional cluster with six nodes (three zones with two nodes
each, specified by
gcloud beta container clusters create my-regional-cluster --num-nodes=2 --region=us-west1
To create a regional cluster with six nodes in two zones (two zones,
--node-locations, with three nodes each):
gcloud beta container clusters create my-regional-cluster --region=us-central1 --node-locations=us-central1-b,us-central1-c