What You Will Set Up
Three command-line tools do all the work in this course, and each has one
job. docker builds images and runs containers through the Docker engine.
kind creates a Kubernetes cluster by running a node as a Docker container.
kubectl talks to a Kubernetes cluster, whichever one its configuration
points at. By the end of this lesson all three are installed, each has
answered a readiness command, and you know how to tell which tool a problem
belongs to.

Read the diagram left to right. Each arrow from the terminal is one tool
doing its job: docker builds, runs and pushes; kind creates the node
container and, along the dashed blue line, writes the connection details
into kubectl's configuration file; kubectl then calls the Kubernetes API
server that lives inside that container. The node container is the only
thing kind makes; everything you later deploy runs as containers inside it.
Nothing in the picture leaves your computer.
The Three Tools
Docker
Docker is two things: a command-line client and an engine (a background service) that the client talks to. On Linux you install Docker Engine, the free software project, as system packages from Docker's repository or your distribution. On macOS and Windows you install Docker Desktop, which runs the engine inside a small virtual machine and includes the client, the Compose plugin and a Kubernetes option the course does not use. Docker Desktop is free for personal use, education, non-commercial open source and businesses with fewer than 250 employees and less than USD 10 million in annual revenue; larger organisations need a paid subscription. On Linux, Docker Engine carries no such terms.
Docker Engine 29 is the current series; the course's images and commands assume 29 or later and were checked with 29.4. Engine 29 stores images with the containerd image store, which matters in one place later: it is what lets the same build produce images for more than one processor architecture.
Pulling images from Docker Hub without signing in is limited to 100 pulls per six hours per network address; the course pulls about a dozen images in total, so the limit should not bite, but a free account doubles it if you share a network with others.
kubectl
kubectl is the Kubernetes command-line client. It does nothing by itself;
it reads a configuration file (~/.kube/config by default, the
kubeconfig) that lists clusters and credentials and names a current
context, and it sends every command to that cluster's API server. The
cluster you create in module 4 will add itself to that file. One rule to
install by: kubectl must be within one minor version of the cluster, older
or newer. The practice cluster runs Kubernetes 1.36, so kubectl 1.35, 1.36
or 1.37 is right; a 1.34 client works for most commands but prints a skew
warning, and the course does not test it.
kind
kind ("Kubernetes in Docker") creates a cluster whose node is a Docker
container running the Kubernetes components and a container runtime of its
own. It needs only Docker, creates a cluster in a few minutes, deletes it in
seconds, and loads images straight from your machine. The course uses kind
v0.33.0 and pins the node image to Kubernetes 1.36.4 in module 4. On macOS
and Windows, kind's documentation asks for at least 6 GB of memory for
Docker Desktop's virtual machine, 8 GB recommended.
Installing
Follow the official instructions for your platform; the course does not copy them, because installers change. The table says which route each lesson was written against and what to confirm.
| Platform | Docker | kubectl | kind |
|---|---|---|---|
| Linux | Docker Engine from Docker's repository for your distribution, plus the docker-compose-plugin package; add your user to the docker group (this grants root-equivalent privileges, so do it only on your own machine) | Binary from dl.k8s.io with the checksum step, or the pkgs.k8s.io repository for the 1.36 minor | Release binary from the kind releases page |
| macOS | Docker Desktop for Apple silicon or Intel; current and two previous macOS releases; at least 4 GB RAM | brew install kubectl or the binary with the checksum step | brew install kind or the release binary |
| Windows 11 | Install WSL 2 with wsl --install (Ubuntu), then Docker Desktop with WSL integration enabled for that distribution; run every course command inside the Ubuntu shell | Inside WSL, the Linux route | Inside WSL, the Linux route |
On Windows, Docker Desktop also puts its own kubectl on the Windows PATH.
The course uses the WSL shell only, so install kubectl there and ignore the
Windows copy. On macOS, Docker Desktop installs a kubectl too; if which kubectl points into /Applications/Docker.app, that copy may lag behind the
skew rule, so install your own and make sure it comes first on PATH.
Shell Bridge
The exercises run in bash or zsh and use a handful of shell features.
If any of these is new, read this section; otherwise skip to the exercise.
- Variables.
AIM_PORT=18000sets a variable for the current shell;echo $AIM_PORTprints it;export AIM_PORT=18000also passes it to programs the shell starts. Variables vanish when the terminal closes. - Exit codes. Every command finishes with a number: 0 for success,
anything else for failure.
echo $?prints the code of the last command.curluses 7 for "could not connect", which several exercises treat as the expected answer when checking that a port is free. curl.curl -sS URLfetches a URL quietly but still shows errors;-X POST,-Hand-dset the method, a header and a body;-o /dev/null -w '%{http_code}'prints only the status code.- Reading JSON. Many commands print JSON. The course keeps it short enough
to read by eye and tells you which field to look at; where a single field
matters, it uses
--formator-o jsonpathoptions that the lesson explains at that point. - Here documents. A block starting
cat > file <<'EOF'and ending with a line containing onlyEOFwrites everything between intofile. The quotes around the firstEOFkeep the text exactly as written. Copy such a block whole, fromcattoEOF.
Exercise: Confirm the Toolchain
Goal: prove that each tool works and that your shell behaves as the exercises expect.
Starting state: Docker, kubectl and kind installed as above; Docker
Desktop running if you use it. Internet access for one small image pull.
Nothing else is required; this exercise creates no files.
-
Docker client and engine:
docker version docker run --rm hello-world docker compose versiondocker versionprints a Client section and a Server section. If only the Client section appears, followed by an error, the engine is not running. Illustrative Server lines:Server: Docker Desktop 4.69.0 (224084) Engine: Version: 29.4.0 API version: 1.54 (minimum version 1.40) OS/Arch: linux/arm64Compare the Engine version with 29 and note the
OS/Arch: it is the architecture your images will be built for.docker run --rm hello-worldpulls a tiny image, runs it, prints a message that begins "Hello from Docker!" and removes the container because of--rm.docker compose versionprints "Docker Compose version v2...". -
kubectl and kind:
kubectl version --client kind versionIllustrative output:
Client Version: v1.36.4 Kustomize Version: v5.7.1 kind v0.33.0 go1.27.0 darwin/arm64The client minor must be 35, 36 or 37.
kubectl version --clientreads no cluster; without--clientit would also try to reach whatever cluster the current context names and may print a connection error, which is harmless now and useful later. -
Which cluster would
kubectltalk to right now?kubectl config current-context kubectl config get-contextsOn a fresh machine the first command prints
error: current-context is not set, which is the right answer for now. If it prints a name, that is a cluster you already use: note it, because the course will addkind-aimbeside it and you will switch between them deliberately. -
The shell bridge:
export AIM_PORT=18000 echo "port is $AIM_PORT" curl -sS http://127.0.0.1:$AIM_PORT/ ; echo "exit code $?"Expected:
port is 18000, then acurlerror such asFailed to connect to 127.0.0.1 port 18000andexit code 7. That is the pattern the exercises use to confirm a port is free before publishing on it. -
Clean up the only thing you created:
docker image rm hello-world docker image ls hello-worldThe second command prints only its heading line.
Success: docker version shows an Engine of 29 or later, hello-world
printed its message, Compose is v2, kubectl is 1.35 to 1.37, kind is
v0.33.0, and the curl check ended with exit code 7.
If something differs:
| What you see | Likely cause | Next step |
|---|---|---|
Cannot connect to the Docker daemon at unix:///... | The engine is not running | Start Docker Desktop, or sudo systemctl start docker on Linux, then retry |
permission denied while trying to connect to the Docker daemon socket (Linux) | Your user is not in the docker group | Follow Docker's post-install steps, log out and in, retry |
docker: 'compose' is not a docker command | The Compose plugin is missing (Linux Engine) | Install docker-compose-plugin from Docker's repository |
kubectl version --client shows 1.34 or older | An old or bundled client, often Docker Desktop's | Install the current client and put it first on PATH; which kubectl shows which one runs |
kind: command not found | Not installed or not on PATH | Reinstall from the releases page or Homebrew; echo $PATH |
hello-world pull fails with toomanyrequests | Docker Hub pull limit on your network | Wait, or sign in to a free Docker Hub account with docker login |
docker image rm hello-world says the image is used by a container | A hello-world container exists from an earlier run without --rm | docker ps -a --filter ancestor=hello-world; remove that container with docker rm, then remove the image |
Independent task: read the three illustrative failures below and, for each, write down which tool the problem belongs to (Docker, kubectl or kind) and the first command you would run to confirm it. Then check your answers.
A. $ kubectl get nodes
The connection to the server 127.0.0.1:54124 was refused - did you specify the right host or port?
B. $ kind create cluster
ERROR: failed to create cluster: failed to pull image "kindest/node:v1.36.4@sha256:099e04..."
C. $ docker run --rm hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Cleanup: done in step 5. Nothing else was created.
Check Your Understanding
docker versionprints a Client section and then an error. What is running and what is not?- Why does the course insist on the one-minor skew rule for
kubectlwhen a 1.34 client "mostly works" against a 1.36 cluster? - On Windows, why does the course run every command inside WSL rather than
in PowerShell, even though Docker Desktop provides
docker.exe? - You add yourself to the
dockergroup on a Linux laptop. What have you granted yourself?
Answer and Reasoning
Independent task
A belongs to kubectl and the cluster: the client works, but the context
points at an API server that is not answering, here a kind cluster that has
been deleted or stopped. Confirm with kubectl config current-context and
docker ps to see whether a node container exists. B belongs to kind and
Docker: kind could not pull the node image, which is a Docker pull; confirm
with docker pull of the same image to see the network or disk error. C
belongs to Docker: the client cannot reach the engine; confirm the engine
is running (Docker Desktop's window, or systemctl status docker).
Understanding check
- The client is installed and running; the engine is not reachable. Start Docker Desktop or the Docker service.
- "Mostly" is the problem: an out-of-skew client can mis-render or refuse newer fields and prints a warning on every command, and the course cannot test every combination. The rule is cheap to follow and is what the Kubernetes project supports.
- One shell syntax for every learner: the exercises use here documents,
$VARand exit codes the bash way, and the kind and kubectl guides for Linux apply inside WSL. Docker Desktop's WSL integration makesdockeravailable there. - Root-equivalent privileges: anyone who can talk to the Docker engine can start a container that mounts the whole disk. Docker's documentation says so, which is why the course limits this to your own machine.
References
- S01: Kubernetes releases
- S02: Kubernetes version skew policy
- S03: kind releases
- S04: kind quick start
- S08: kind known issues
- S09: Docker Engine release notes
- S10: Docker Desktop release notes
- S11: Docker Desktop licence agreement
- S12: Docker Hub usage and limits
- S14: Install Docker Engine
- S15: Install Docker Desktop on Mac
- S16: Docker Desktop WSL 2 backend
- S17: Install the Compose plugin on Linux
- S18: Docker Engine Linux post-installation steps
- S37: Python downloads
- S89: Install tools
- S90: Install kubectl on macOS
- S91: Install kubectl on Linux
- S92: Install kubectl on Windows
- S138: Install WSL