GCP - How to create a Kubernestes cluster

1. Login to GCP and activate Cloud Shell

2. Check and set current project

# Check the current account:
gcloud auth list
# Check the current project:
gcloud config list project
# Set the project:
gcloud config set project <PROJECT_ID>

3. Enable the container service:

gcloud services enable container.googleapis.com

4. Create your GKE cluster:

gcloud container clusters create cloud-trace-demo --zone=$ZONE

5. Get nodes of the cluster:

kubectl get nodes



Back to posts