Learning Kubernetes From Scratch (Part 1) – Setup
By Newt / June 25, 2025 / No Comments / Kubernetes
π Starting My Kubernetes Journey
This marks the start of my Kubernetes journey β a powerful tool Iβve wanted to explore after diving into cloud βοΈ and containerisation π³. Iβm turning this into a hands-on tutorial series for beginners, sharing everything I learn as I go. To kick things off, weβll start with Minikube β an easy, cost-free way to run Kubernetes locally π₯οΈ and get straight into the action.
π First off β Why Minikube is Ideal for Learning Kubernetes
- π Local Development Environment
- Runs a single-node Kubernetes cluster locally π₯οΈ
- No need for cloud resources or costs πΈ
- Works on your laptop/desktop π»
- βοΈ Simplified Setup
minikube start --driver=docker
minikube status
- π Learning Benefits
- Isolated Environment: Mistakes don't affect production systems π«β οΈ
- Quick Reset π:
minikube delete minikube start
- Built-in Dashboard π:
minikube dashboard
- π₯οΈ Resource Control
minikube start --driver=docker --cpus=2 --memory=4096mb
- β‘ Production-Like Features
- π¦ Pods
- π’ Deployments
- π Services
- π ConfigMaps
- π Secrets
- β Easy Add-ons
minikube addons list
minikube addons enable metrics-server
- π οΈ Direct Container Access
- Easy access to container registry π¦
- No complex configuration needed π§©
- Perfect for testing deployments β
- π Documentation Support
- Well-documented π
- Large community π₯
- Plenty of tutorials available π
Minikube provides a perfect sandbox ποΈ for learning Kubernetes concepts before moving to production environments or cloud platforms.
π» Installing Minikube Components on Windows
β Prerequisites
- Windows 10/11 64-bit πͺ
- Virtualisation is enabled in BIOS π₯οΈβοΈ
- At least 4GB RAM and 2 CPU cores free π§ π₯
π οΈ Installation Steps (Windows)
- Install Docker Desktop π³
Download Docker Desktop
Install and restart your computer πdocker --version docker run hello-world
- Install kubectl π§°
Using Windows Package Manager (winget):Verify βοΈ:winget install -e --id Kubernetes.kubectl
kubectl version --client
- Install Minikube π
Verify βοΈ:winget install minikube
minikube version
π§ Installation Steps (Linux)
To install Docker on your Linux system (Ubuntu/Debian), first update your package list and install essential dependencies:
sudo apt update sudo apt install -y ca-certificates curl gnupg lsb-release
Next, add Dockerβs official GPG key to ensure the software you install is authentic:
sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Then, set up the Docker stable repository so your package manager knows where to fetch Docker packages:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Finally, update your package list again and install Docker Engine and related components:
sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io
π§° Installing Docker, kubectl and Minikube
If you want to run Docker commands without needing to type sudo
every time, add your user to the Docker group. This step is optional but recommended:
sudo usermod -aG docker $USER
newgrp docker
Verify your Docker installation by checking its version and running the test container:
docker --version
docker run hello-world
Now, install kubectl
, the Kubernetes command-line tool, by downloading the latest stable release and making it executable:
curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
Setting Up Your Kubernetes Learning Directory (Windows PowerShell) π₯οΈ
Organise your workspace by creating directories for exercises in different Kubernetes skill levels.
This is the directory structure I will be using, so feel free to copy and follow along with me:
mkdir exercises
New-Item -ItemType Directory -Path "exercises\2-intermediate","exercises\2-intermediate\pods","exercises\2-intermediate\deployments","exercises\2-intermediate\services","exercises\2-intermediate\config","exercises\3-advanced","exercises\3-advanced\pods","exercises\3-advanced\deployments","exercises\3-advanced\services","exercises\3-advanced\config"
Setting Up Your Kubernetes Learning Directory (Linux or macOS) οΈπ§π
For Linux or macOS, you can create the same folder structure with a single command using mkdir -p
:
mkdir -p exercises/2-intermediate/pods \ exercises/2-intermediate/deployments \ exercises/2-intermediate/services \ exercises/2-intermediate/config \ exercises/3-advanced/pods \ exercises/3-advanced/deployments \ exercises/3-advanced/services \ exercises/3-advanced/config
Next Steps π
Happy learning! π If you have questions or want to share your progress, feel free to comment. Letβs master Kubernetes together! π€π³
You can now move on to Part 2!