- Open and configure Cloud Shell
- Set a default compute zone to simplify future commands
- Provision a GKE cluster with a custom boot disk
- Validate the cluster creation via CLI and Console
Prerequisites
- A Google Cloud project with billing enabled
- The Kubernetes Engine Admin or Owner IAM role
- Access to Cloud Shell
1. Activate Cloud Shell
- Sign in to the Google Cloud Console.
- Click the Activate Cloud Shell button in the top-right toolbar.
- Wait for the shell to initialize; you should see a prompt like:
2. Set the Default Compute Zone
Rather than appending--zone to every gcloud command, define a default zone for this session. In this lesson, we’ll use us-west1-a:
Defining a default zone streamlines your workflow by removing the need to specify it repeatedly, reducing the risk of mistakes.
3. Provision the GKE Cluster
We’ll create a cluster namedgke-deep-dive with one node and a custom HDD boot disk. You can adjust these parameters to suit your needs.
| Setting | Description | Flag |
|---|---|---|
| Cluster name | Human-readable identifier | --cluster=gke-deep-dive |
| Node count | Number of worker nodes | --num-nodes=1 |
| Disk type | Standard HDD (pd-standard) | --disk-type=pd-standard |
| Disk size | 10 GiB | --disk-size=10 |
Cluster creation typically takes 10–15 minutes. Do not interrupt the process.
Monitor progress via the Cloud Shell output or the GKE Console.
Monitor progress via the Cloud Shell output or the GKE Console.
4. Verify Cluster Creation
a) Using the CLI
List all GKE clusters in your project:b) Using the Cloud Console
- In the Google Cloud Console, navigate to Kubernetes Engine ▶ Clusters.
- Confirm that gke-deep-dive appears under us-west1-a.