A beginner-friendly, interactive codelab built in the style of Google Codelabs covering everything from containers to deploying, scaling, and updating a live app on GKE.
This codelab walks complete beginners through deploying their very first containerized application on Google Kubernetes Engine (GKE). No prior Kubernetes or cloud experience required.
What you'll learn:
- Why containers exist and what problem they solve.
- What Kubernetes and GKE are (in plain English).
- Core concepts: Pods, Deployments, Services, Nodes.
- How to create a GKE cluster using Cloud Shell.
- How to deploy, expose, scale, and update an app.
- How to perform a zero-downtime rolling update.
Format: Interactive step-by-step codelab · 8 steps · ~30 minutes
gke-codelab/
├── index.html ← Standalone interactive codelab (open in any browser)
├── images/ ← Screenshots of commands executed.
└── README.md ← You are here
Below is a full walkthrough of all the commands executed during this codelab, with real output screenshots.
Creates a 2-node GKE cluster in us-central1-a. The Kubernetes Engine API is auto-enabled on first run.
gcloud container clusters create my-first-cluster \
--num-nodes=2 \
--zone=us-central1-aCluster
my-first-clustercreated with 2 nodes, running Kubernetesv1.34.3-gke, STATUS: RUNNING
Configures kubectl to point at the newly created cluster.
gcloud container clusters get-credentials my-first-cluster \
--zone=us-central1-akubectl get nodesBoth nodes show STATUS: Ready the cluster is healthy and ready for workloads.
Creates a Deployment running the hello-app:1.0 container image.
kubectl create deployment hello-app \
--image=gcr.io/google-samples/hello-app:1.0kubectl get podsPod
hello-app-6f65bf88...is Running with 0 restarts ✅
Creates a LoadBalancer Service that gives the app a public IP.
kubectl expose deployment hello-app \
--type=LoadBalancer \
--port=80 \
--target-port=8080kubectl get service hello-app --watchExternal IP assigned:
34.41.57.97app is now live on the internet 🌐
Opening the external IP in a browser shows the running app:
Version: 1.0.0· Hostname:hello-app-6f65bf884d-trk2m
kubectl scale deployment hello-app --replicas=3One command to go from 1 Pod to 3 GKE load balances across all three automatically.
Confirms 3 Pods are running, then updates to hello-app:2.0:
kubectl get pods
kubectl set image deployment/hello-app \
hello-app=gcr.io/google-samples/hello-app:2.0kubectl rollout status deployment/hello-app
deployment "hello-app" successfully rolled out— zero downtime ✅
After the rolling update, refreshing the browser shows the new version:
Version: 2.0.0· New Pod hostname confirms the update rolled out successfully
Deletes the Service and the cluster to avoid ongoing charges.
kubectl delete service hello-app
gcloud container clusters delete my-first-cluster \
--zone=us-central1-aService deleted · Cluster
my-first-clusterdeleted fromus-central1-a✅
| Requirement | Details |
|---|---|
| Google Account | Gmail works |
| Google Cloud Project | Create one here $300 free credits for new accounts |
| Cloud Shell | Browser-based terminal, no local install needed |
| Billing enabled | Required for GKE cluster creation |
This codelab costs approximately $0.10–$0.30 to complete. All resources are deleted in the final cleanup step.
After completing this codelab, explore:
| Topic | Resource |
|---|---|
| ConfigMaps & Secrets | kubernetes.io/docs |
| Ingress & Gateway API | GKE Docs |
| Cluster Autoscaler | GKE Docs |
| Helm | helm.sh |
| CKA Certification | cncf.io/certification/cka |
| Google Cloud Skills Boost | cloudskillsboost.google |
This project is open source and available under the MIT License.








%20-%20Copy.png)


.png)
