GKE cluster zones and regions¶
In Google Kubernetes Engine (GKE), a cluster is a set of compute resources, and its location is defined by a Region or a Zone.^[400-devops__05-Cloud-Provider__GCP.md]
Compute Engine Regions and Zones¶
Google Compute Engine resources are hosted in locations globally. These locations are composed of Regions and Zones.
- A Zone is a deployment area for resources within a region (e.g.,
asia-east1-b).^[400-devops__05-Cloud-Provider__GCP.md] - A Region is a specific geographical location that contains one or more zones (e.g.,
asia-east1).^[400-devops__05-Cloud-Provider__GCP.md]
When configuring the Google Cloud SDK, users can set a default Compute Engine zone and region. If a zone is specified via command line flags, it overrides the default setting^[400-devops__05-Cloud-Provider__GCP.md].
Accessing Clusters¶
To interact with a GKE cluster using kubectl, you must first configure your local environment. This involves fetching the cluster's endpoint and authentication data and generating a kubeconfig entry^[400-devops__05-Cloud-Provider__GCP.md]. This action requires specifying the project ID and the zone where the cluster resides^[400-devops__05-Cloud-Provider__GCP.md].
For example, to get credentials for a cluster named ubpay-dev located in zone asia-east2-b within project unistar-dev-v1, the following command is used^[400-devops__05-Cloud-Provider__GCP.md]:
gcloud container clusters get-credentials ubpay-dev --zone asia-east2-b
Related Concepts¶
- [[GKE]]
- Kubernetes
Sources¶
^[400-devops__05-Cloud-Provider__GCP.md]