[Playground series] How to create a managed Kubernetes cluster on Google Cloud Playground?
In this post, let’s go through steps to create a managed Kubernetes cluster on Google Cloud using GKE, check it out!
1. Provision your Google Cloud Playground lab.
Prerequisite: Premium KodeKloud subscription.
Access this link: Pricing Pro - KodeKloud and click START LAB to request a new Google Cloud Playground instance, after a few seconds, you will receive your credential to access Google Cloud console.
Access https://console.cloud.google.com using provided credentials.
2. Configure the project
After logging in successfully, select your country, and accept the terms & conditions to continue.
Click select project.
Select Organization and Project (all are already created, you don’t need to create a new one), then click OPEN.
3. Configure the VPC & Firewall Rules
Notes: Due to the limitation of the cloud playground environment, we need this additional steps to make sure the GKE cluster can be created successfully.
Go to VPC dashboard and select Routes, then click CREATE ROUTE
Fill in the form as below image
Check the Firewall Rules and confirm allow http & allow https are created (if not yet available, please create it by yourself).
4. Create the Google Kubernetes Engine instance.
Search for Google Kubernetes Engine.
From the Kubernetes Engine dashboard, click CREATE to create a new managed Kubernetes cluster.
Select the Standard mode (we will manage our own cluster).
Fill in the “Cluster Basics” form.
Location type: Zonal
Control plane version: Release channel
In the default-pool, configure as below image.
- Number of nodes: 2
In the default-pool/Nodes, configure as below image.
Machine type: e2-medium
Boot disk size: 20GB
Then click CREATE button and wait for our Kubernetes cluster created (Cluster creation can take 5 minutes or more).
Kubernetes Cluser created successfully as below image:
5. Verify the create Kubernetes cluster
Access the cluster detail and click Connect, and then select Run In Cloud Shell
Click Continue and wait while Google Cloud provision the Cloud Shell. When Cloud Shell provisioned, try some kubectl commands to verify the cluster.
[email protected]:~ (clgcporg2-147)$ kubectl get nodes NAME STATUS ROLES AGE VERSION gke-cluster-1-default-pool-b70d5f70-8pfq Ready <none> 10m v1.23.12-gke.100 gke-cluster-1-default-pool-b70d5f70-hmzq Ready <none> 10m v1.23.12-gke.100 [email protected]:~ (clgcporg2-147)$ kubectl cluster-info Kubernetes control plane is running at https://188.8.131.52 GLBCDefaultBackend is running at https://184.108.40.206/api/v1/namespaces/kube-system/services/default-http-backend:http/proxy KubeDNS is running at https://220.127.116.11/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy Metrics-server is running at https://18.104.22.168/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy