πŸš€ 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)

  1. Install Docker Desktop 🐳
    Download Docker Desktop
    Install and restart your computer πŸ”„
    docker --version
    docker run hello-world
  2. Install kubectl 🧰
    Using Windows Package Manager (winget):
    winget install -e --id Kubernetes.kubectl
    Verify βœ”οΈ:
    kubectl version --client
  3. Install Minikube πŸš€
    winget install minikube
    Verify βœ”οΈ:
    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!

Leave a Reply

Your email address will not be published. Required fields are marked *