Creating a GKE cluster
Learn how to create a cluster in Google Kubernetes Engine.
We'll cover the following...
Spin up a cluster
Starting from now we’ll move to a terminal and use the gcloud
tool. To install Google Cloud CLI, please follow the steps mentioned in the following links (depending on your machine):
- For macOS, please use this link.
- For Linux, please use this link.
- For Debian/Ubuntu, please use this link.
- For Windows, please use this link.
Also, to log in and use your account, run the following command:
gcloud auth login
The first thing to do is to configure our gcloud
tool to be connected with the right project, as follows:
gcloud config set project [your project id]Updated property [core/project].gcloud config set compute/region [your region id]Updated property [compute/region].gcloud config set compute/zone [your zone]Updated property [compute/zone].
And here is the explanation for some of the inputs:
[your project id]
:This is the ID of a project, not its name. We can find it by running thegcloud projects list
command.[your region id]
: This is the default region in which we want to spin up our cluster. Select the region which is the closest to your location, e.g., europe-central2.[your zone]
:This is the default zone. Here, select the zone which is a part of your region, e.g., europe-central2-a.
A list of all the available regions and zones can be found in the official documentation.
Note: When we spin up our cluster, Google will start to measure the usage of their resources and charge us for it. To make sure that doesn’t happen, we need to delete it after using it. To track our spending we can go to the Billing page.
Instructions on how to remove a cluster are given in this lesson in “Deleting a GKE cluster.”
Now that we’re aware of the precautions, we can proceed with creating an Autopilot cluster with ...