1. Setup
The lab exercises require the installation and configuration of a few tools. This page will help you get started.
Local Installation
The exercises assume a UNIX environment and are tested on macOS and on Windows with WSL 2 (Ubuntu).
- macOS: the instructions use Homebrew. Run all commands in a terminal.
- Windows: install the Windows Subsystem for Linux as described below. Run all commands of this training inside the WSL terminal — not in PowerShell or the Command Prompt, unless stated otherwise.
CPU architecture
The Linux / WSL commands on this page download amd64 binaries. On a Windows machine with an ARM processor,
replace amd64 with arm64.
Windows Subsystem for Linux (Windows only)
Open PowerShell as Administrator, install WSL with the default Ubuntu distribution and restart your machine:
After the restart, open Ubuntu from the Start menu and create your Linux user and password.
Verify that Ubuntu runs on WSL version 2 (in PowerShell):
The VERSION column must show 2. Details: https://learn.microsoft.com/en-us/windows/wsl/install
Keep your files in WSL
Store the lab files in your Linux home directory (~/), not under /mnt/c/. Accessing the Windows file system
from WSL is significantly slower.
CLI Tools
Docker
k3d runs the Kubernetes nodes as Docker containers, and Docker builds the container image of the app you deploy later in this training.
- macOS:
brew install --cask docker-desktop, then start Docker Desktop from the Applications folder - Windows (WSL): install
Docker Desktop for Windows on the Windows side,
start it and connect it to WSL:
- Settings → General: make sure Use WSL 2 based engine is selected
- Settings → Resources → WSL Integration: enable the integration for Ubuntu
- Select Apply and reopen your WSL terminal
- All platforms: https://docs.docker.com/get-started/get-docker/
Docker Desktop license
Docker Desktop is free for personal use, education, non-commercial open source projects and small businesses (fewer than 250 employees and less than USD 10 million annual revenue). Larger organizations need a paid subscription. Free alternatives are Colima on macOS and Docker Engine installed directly inside WSL (see below).
Verify the daemon is running:
You should see system-wide information about the Docker installation with no errors.
Test Docker in WSL (Windows only)
Run the following checks in the WSL terminal to make sure Docker works from inside WSL.
Check that the Docker CLI reaches the Docker daemon. The output must contain both a Client and a Server
section:
Run a test container. You should see the message Hello from Docker!:
Publish a port from a container and reach it from Windows:
Open http://localhost:8080 in your Windows browser — you should see the Welcome to nginx! page. Stop the container afterwards:
Common errors
The command 'docker' could not be found in this WSL 2 distro— the WSL integration for Ubuntu is not enabled in Docker Desktop (Settings → Resources → WSL Integration).Cannot connect to the Docker daemon— Docker Desktop is not running, or (Docker Engine in WSL) the service is stopped:sudo systemctl start docker.permission denied while trying to connect to the Docker daemon socket— (Docker Engine in WSL) your user is not in thedockergroup: runsudo usermod -aG docker $USERand reopen the terminal.
k3s and k3d
k3s is a lightweight, certified Kubernetes distribution — the Kubernetes cluster you work with in this training. k3s only runs on Linux, so we use k3d to run k3s inside Docker containers, on macOS and WSL alike. There is no separate k3s installation: k3d pulls the k3s container image when you create a cluster.
- macOS:
brew install k3d - Linux / WSL:
- All platforms: https://k3d.io
Verify the installation:
The output shows the k3d version and the k3s version it deploys by default.
kubectl
- macOS:
brew install kubectl - Linux / WSL:
- All platforms: https://kubernetes.io/docs/tasks/tools/
Verify the installation:
Optional: alias k for kubectl
You will type kubectl a lot. Defining the short alias k for it is common practice among Kubernetes users — you
will come across commands like k get pods in many blog posts, examples and talks. The alias is optional: this
training always writes out the full kubectl command.
- macOS (default shell: zsh):
- Linux / WSL (default shell: bash):
Verify the alias:
Helm
- macOS:
brew install helm - Linux / WSL:
- All platforms: https://helm.sh/docs/intro/install/
Verify the installation. The version must start with v4:
yq
yq is a lightweight command-line YAML processor used to inspect and manipulate Kubernetes manifests and Helm
values files.
- macOS:
brew install yq - Linux / WSL:Do not use
apt install yq— the Debian package is no longer maintained. - All platforms: https://github.com/mikefarah/yq
Verify the installation:
IDE
Install PyCharm (recommended) or Visual Studio Code — both have strong Python and Kubernetes support.
On Windows, install the IDE on the Windows side and configure it so that its terminal opens a WSL shell. Every command in this training must run in WSL.
PyCharm (recommended)
- macOS:
brew install --cask pycharm - Windows: download and install from https://www.jetbrains.com/pycharm/download
PyCharm’s core features are free. Since version 2025.1, Community and Professional are a single product; the Pro features come with a 30-day trial.
- Install the Kubernetes plugin via Settings → Plugins
Windows: open the terminal in WSL
- Open Settings → Tools → Terminal
- Set Shell path to
wsl.exe - Open a new terminal tab (View → Tool Windows → Terminal) and verify that it runs in WSL:The output must be
Ubuntu.
Open your project from the WSL file system: File → Open and select the folder under
\\wsl.localhost\Ubuntu\home\<your-user>\.
Visual Studio Code
- macOS:
brew install --cask visual-studio-code - Windows: download and install from https://code.visualstudio.com/download and keep Add to PATH selected, so that you can start VS Code from WSL
Windows: open the terminal in WSL
- Install the WSL extension (
ms-vscode-remote.remote-wsl) - In the WSL terminal, change into your project directory and open it with:
- The status bar shows WSL: Ubuntu in the bottom-left corner. Terminal → New Terminal now opens a WSL
shell. Verify it:The output must be
Ubuntu.
Install the following extensions. On Windows, install them while VS Code is connected to WSL — the Extensions view shows Install in WSL: Ubuntu:
- Python (
ms-python.python) - Kubernetes (
ms-kubernetes-tools.vscode-kubernetes-tools)
Verify the Setup
Create a throwaway cluster to check that all tools work together:
The two --disable flags keep the cluster minimal: k3s is started without its built-in Ingress controller
(Traefik) and without its built-in load balancer (ServiceLB).
You should see one node with the status Ready. k3d added the context k3d-setup-test to your kubeconfig
(~/.kube/config) and switched kubectl to it.
Delete the cluster again: