Goal: Setup local Kubernetes cluster with essential tooling
Time: 20 min | Prereq: Day 00
graph TB
A[Your Laptop] --> B[Docker]
B --> C[kind Cluster<br/>3 nodes]
C --> D[Gateway API]
C --> E[cert-manager]
C --> F[ingress-nginx]
style A fill:#4CAF50
style B fill:#2196F3
style C fill:#FF9800
style D fill:#9C27B0
style E fill:#9C27B0
style F fill:#9C27B0
Read the diagram:
- Docker: Container runtime (runs kind)
- kind: Kubernetes in Docker (3-node cluster)
- Gateway API: Modern ingress (for Backstage/ArgoCD)
- cert-manager: TLS certificate automation
- ingress-nginx: HTTP routing (Section 01 labs)
| Tool | Version | Purpose |
|---|---|---|
| Docker | v24+ | Container runtime |
| kubectl | v1.28+ | K8s CLI |
| kind | v0.20+ | Local K8s cluster |
| Helm | v3.14+ | K8s package manager |
| Node.js | v18/v20 LTS | Backstage requirement |
| Git | Any | Version control |
# Create validation script
cat > validate-setup.sh << 'EOF'
#!/bin/bash
echo "=== Toolchain Validation ==="
# Docker
docker version --format 'Docker: {{.Server.Version}}' 2>/dev/null || echo "❌ Docker not running!"
# kubectl
kubectl version --client --short 2>/dev/null || echo "❌ kubectl missing!"
# kind
kind version 2>/dev/null || echo "❌ kind missing!"
# Helm
helm version --template 'Helm: {{.Version}}' 2>/dev/null || echo "❌ helm missing!"
# Node.js
echo "Node.js: $(node --version 2>/dev/null || echo 'missing')"
echo "npm: $(npm --version 2>/dev/null || echo 'missing')"
# Git
git --version 2>/dev/null || echo "❌ git missing!"
echo -e "\n✅ All tools present? Run next steps."
EOF
chmod +x validate-setup.sh
./validate-setup.shExpected output:
Docker: 24.0.7
kubectl: v1.28.0
kind: v0.20.0
Helm: v3.14.0
Node.js: v20.10.0
npm: 10.2.3
git version 2.42.0
If missing tools: See installation guide below.
# Create 3-node cluster config
cat > kind-config.yaml << 'EOF'
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: platform-engineering
nodes:
- role: control-plane
- role: worker
- role: worker
EOF
# Create cluster (~2 min)
kind create cluster --config kind-config.yaml
# Verify cluster
kubectl cluster-info --context kind-platform-engineering
kubectl get nodesExpected output:
NAME STATUS ROLES AGE
platform-engineering-control-plane Ready control-plane 1m
platform-engineering-worker Ready <none> 1m
platform-engineering-worker2 Ready <none> 1m
# Install Gateway API CRDs (v1.0.0)
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml
# Verify CRDs installed
kubectl get crd | grep gatewayExpected: gatewayclasses.gateway.networking.k8s.io, gateways.gateway.networking.k8s.io
# Install Envoy Gateway (v1.0.2)
helm install eg oci://docker.io/envoyproxy/gateway-helm \
--namespace envoy-gateway-system \
--create-namespace \
--version v1.0.2
# Wait for ready (~1 min)
kubectl wait \
--namespace envoy-gateway-system \
--for=condition=ready pod \
--selector=control-plane=envoy-gateway \
--timeout=180s
# Verify
kubectl get pods -n envoy-gateway-systemExpected: envoy-gateway-xxx pod Running
# Add Helm repo
helm repo add jetstack https://charts.jetstack.io
helm repo update
# Install cert-manager (v1.14.4)
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.14.4 \
--set crds.enabled=true \
--set startupapicheck.enabled=false
# Verify (~30 sec)
kubectl get pods -n cert-managerExpected: 3 pods (cert-manager, cainjector, webhook) Running
# Add Helm repo
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
# Install ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx \
--namespace ingress-nginx \
--create-namespace \
--set controller.service.type=ClusterIP
# Wait for ready (~1 min)
kubectl wait \
--namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=180s
# Verify
kubectl get pods -n ingress-nginxExpected: ingress-nginx-controller-xxx pod Running
# Create workspace folders
mkdir -p platform/{apps,infra,docs,scripts}
mkdir -p artifacts/section-00
# Verify structure
tree platform/ artifacts/Structure:
platform/
├── apps/ # Application manifests
├── infra/ # Infrastructure as code
├── docs/ # Documentation
└── scripts/ # Automation scripts
artifacts/
└── section-00/ # Course deliverables
# Run full verification
cat > verify-bootstrap.sh << 'EOF'
#!/bin/bash
echo "=== Bootstrap Verification ==="
# Cluster
echo -n "Cluster: "
kubectl get nodes --no-headers | wc -l | grep -q 3 && echo "✅ 3 nodes" || echo "❌ nodes missing"
# Gateway API
echo -n "Gateway API: "
kubectl get crd gatewayclasses.gateway.networking.k8s.io &>/dev/null && echo "✅ installed" || echo "❌ missing"
# Envoy Gateway
echo -n "Envoy Gateway: "
kubectl get pods -n envoy-gateway-system --no-headers 2>/dev/null | grep -q Running && echo "✅ running" || echo "❌ not running"
# cert-manager
echo -n "cert-manager: "
kubectl get pods -n cert-manager --no-headers 2>/dev/null | grep -c Running | grep -q 3 && echo "✅ 3 pods" || echo "❌ not running"
# ingress-nginx
echo -n "ingress-nginx: "
kubectl get pods -n ingress-nginx --no-headers 2>/dev/null | grep -q Running && echo "✅ running" || echo "❌ not running"
echo -e "\n✅ Ready for Day 02!"
EOF
chmod +x verify-bootstrap.sh
./verify-bootstrap.sh| Error | Fix |
|---|---|
Docker daemon not running |
Start Docker Desktop |
kind cluster exists |
Delete: kind delete cluster --name platform-engineering |
connection refused |
Wait 30s for pods to start |
ImagePullBackOff |
Check internet connection, Docker proxy settings |
context kind-xxx not found |
Run: kubectl config use-context kind-platform-engineering |
- Mac: Docker Desktop
- Windows: Docker Desktop (enable WSL2)
- Linux: Docker Engine
# Mac
brew install kubectl
# Linux
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Windows (PowerShell)
choco install kubernetes-cli# Mac
brew install kind
# Linux
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind && sudo mv ./kind /usr/local/bin/kind
# Windows
choco install kind# Mac
brew install helm
# Linux
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Windows
choco install kubernetes-helm- Download LTS: https://nodejs.org/en/download
# Delete cluster (keeps tools installed)
kind delete cluster --name platform-engineering
# Recreate from kind-config.yaml when needed
kind create cluster --config kind-config.yaml→ Day 02: Cloud Cost Guardrails - Resource quotas & limits
📚 Deep Dive: See Day 01 - Original
📖 Resources:
- All tools installed & validated
- 3-node kind cluster running
- Gateway API CRDs installed
- Envoy Gateway running
- cert-manager running (3 pods)
- ingress-nginx running
- Project folders created
- Verification script passes