A hands-on WordRush game and GKE learning project — type the biggest unique word in 5 seconds, score 1–1000, deployed on Google Kubernetes Engine (GKE) with annotated manifests and CI/CD.
| Module | Topics |
|---|---|
| 00 Code → Production | Master narrative: containers, registry, GKE, networking, CI/CD end-to-end |
| 01 Prerequisites | gcloud, kubectl, Docker, billing |
| 02 GKE Cluster | Terraform, node pools, Workload Identity |
| 03 Container Images | Dockerfiles, multi-stage builds, Artifact Registry |
| 04 Kubernetes Basics | Pods, Deployments, Services, probes |
| 05 Networking | ClusterIP, Ingress, GCE Load Balancer |
| 06 Storage | PVCs, StatefulSets, GKE storage classes |
| 07 Secrets & Config | ConfigMaps, Secrets, external secret management |
| 08 Scaling & Resilience | HPA, PDB, rolling updates |
| 09 Observability | Logs, metrics, health checks |
| 10 CI/CD | GitHub Actions, Workload Identity Federation |
| Errors we hit | Real CI/GKE failures and fixes from this project |
| 11 Production Checklist | HTTPS, backups, cost, security |
┌─────────────────────────────────────┐
│ GKE Ingress (GCE LB) │
│ http://EXTERNAL_IP │
└──────────┬──────────────┬───────────┘
│ │
┌──────────▼──┐ ┌──────▼──────┐
│ Frontend │ │ API │
│ (nginx) │───▶│ (Go) │
│ Deployment │ │ Deployment │
└─────────────┘ └──┬───────┬────┘
│ │
┌───────────▼┐ ┌──▼────────┐
│ PostgreSQL │ │ Redis │
│ StatefulSet│ │ Deployment│
│ + PVC │ │ (queue) │
└────────────┘ └─────┬─────┘
│
┌──────▼──────┐
│ Worker │
│ Deployment │
└─────────────┘
Every resource type below is deployed and documented:
- Namespace with Pod Security Standards
- Deployment — API, Frontend, Worker, Redis
- StatefulSet — PostgreSQL with persistent volume
- Service — ClusterIP (internal) + headless (StatefulSet)
- Ingress — GKE HTTP(S) Load Balancer
- BackendConfig — GKE-specific LB tuning
- ConfigMap — non-sensitive configuration
- Secret — database credentials
- ServiceAccount + RBAC — least-privilege access
- HorizontalPodAutoscaler — CPU-based autoscaling
- PodDisruptionBudget — safe cluster upgrades
- NetworkPolicy — pod-to-pod firewall rules
- Job — one-time data seeding
- CronJob — scheduled cleanup
- Init Containers — wait for dependencies
make dev
# Open http://localhost:3000make local-k8s
kubectl port-forward svc/frontend -n kubelab 3000:80
# Open http://localhost:3000# 1. Set your GCP project
export GCP_PROJECT_ID=your-project-id
gcloud config set project $GCP_PROJECT_ID
# 2. Create cluster + Artifact Registry
make setup-gke
# 3. Build and push images
make push
# 4. Deploy to GKE
make deploy
# 5. Get the external IP (may take 5-10 min)
kubectl get ingress kubelab-ingress -n kubelab -wkube/
├── app/
│ ├── api/ # Go REST API (word scoring, health, metrics)
│ ├── worker/ # Background score indexer (Redis queue)
│ └── frontend/ # WordRush game UI + nginx
├── k8s/
│ ├── base/ # All Kubernetes manifests
│ └── overlays/ # Kustomize env-specific configs
│ ├── local/
│ ├── gke-dev/
│ └── gke-prod/
├── infra/terraform/ # GKE cluster + Artifact Registry
├── scripts/ # Setup, build, deploy automation
├── docs/ # Step-by-step learning modules
├── docker-compose.yml # Local development
└── Makefile # Common commands
Start here: docs/00-from-code-to-production.md — the full deployment story from Dockerfile to Ingress.
Follow the docs in order. Each module includes exercises — hands-on commands to run and concepts to verify.
- Start with Docker Compose (
make dev) to understand the app - Read docs/04-kubernetes-basics.md while exploring manifests in
k8s/base/ - Deploy to kind (
make local-k8s) to practice kubectl without cloud costs - Provision GKE with Terraform and deploy for real
- Work through scaling, networking, and production hardening modules
# Watch pods come up
kubectl get pods -n kubelab -w
# Describe a failing pod
kubectl describe pod -l app.kubernetes.io/name=api -n kubelab
# Shell into postgres
kubectl exec -it postgres-0 -n kubelab -- psql -U kubelab
# Trigger HPA test (requires load generator)
kubectl run -it loadgen --rm --image=busybox -n kubelab -- sh -c "while true; do wget -qO- http://api:8080/api/orders; done"
# View HPA status
kubectl get hpa -n kubelab
# Check NetworkPolicies
kubectl get networkpolicy -n kubelab
# View CronJob history
kubectl get cronjobs,jobs -n kubelabA GKE cluster with 1 e2-medium node costs roughly $25–35/month. Delete when done:
cd infra/terraform && terraform destroyOr use GKE Autopilot (pay-per-pod) for lower idle costs — see docs/02-gke-cluster.md.
MIT — use freely for learning.