Skip to content

Installation & Setup

Everything runs on minikube. You do not need a cloud account or a production cluster.

ToolMinimum VersionInstall
Minikubev1.32+brew install minikube or docs
kubectlv1.28+brew install kubectl
Helmv3.13+brew install helm
Docker or PodmanLatestbrew install podman

Some labs have additional requirements noted in their own page.

ToolPurposeInstall
TaskRun labs with task demo -- simple-appbrew install go-task
jqParse JSON output from kubectlbrew install jq
k9sTerminal-based cluster UIbrew install k9s
ResourceMinimumRecommended
CPU cores46+
RAM8 GB12+ GB
Disk20 GB40 GB

You do not need all resources at once. Each lab is self-contained. Clean up one lab before starting another if your machine is constrained.

Terminal window
minikube start \
--cpus=4 \
--memory=8192 \
--disk-size=40g \
--driver=docker

If you use Podman, pass --driver=podman instead.

For heavier labs (Prometheus, CloudNativePG, Redis, real-world demos), consider allocating more memory:

Terminal window
minikube start --cpus=6 --memory=12288 --disk-size=40g
Terminal window
kubectl cluster-info
kubectl get nodes

You should see a single node in Ready state.

Most labs benefit from these addons. Enable them once after starting minikube:

Terminal window
minikube addons enable ingress
minikube addons enable metrics-server

The ingress addon provides an nginx ingress controller. The metrics-server addon is required for the HPA lab and any lab that uses kubectl top.

Minikube provides several ways to reach services running inside the cluster:

Terminal window
# Option 1: minikube service (opens browser)
minikube service <service-name> -n <namespace>
# Option 2: port-forward
kubectl port-forward svc/<service-name> <local-port>:<service-port> -n <namespace>
# Option 3: minikube tunnel (for LoadBalancer services)
minikube tunnel
Terminal window
git clone https://github.com/savitojs/k8s-learn-by-doing.git
cd k8s-learn-by-doing

All lab manifests live in the demos/ directory. Each lab is self-contained.

If you installed Task, you can run labs with a single command:

Terminal window
# Deploy a lab
task demo -- simple-app
# Clean up a lab
task clean -- simple-app
# List all labs
task list
# Check prerequisites
task prereqs

The -- separator is required because Task passes everything after it as CLI_ARGS.

You can also run labs manually with kubectl. Every lab README shows the raw kubectl commands.

The real-world labs run multi-service architectures (Kafka, EFK, microservices, service mesh). They consume significantly more resources than the concept labs.

Before running a real-world lab:

  1. Clean up any running labs first: task clean:all
  2. Allocate at least 6 CPUs and 12GB RAM to minikube
  3. Check each lab’s page for its specific resource requirements
  4. Only run one real-world lab at a time unless you have 16GB+ RAM available

When you are done with all labs:

Terminal window
minikube delete

To clean up a single lab, follow the cleanup section on that lab’s page.

Ready to go? Head to Your First Lab and deploy your first application.