VIKHRAM S

πŸš€ Kubernetes for Absolute Beginners – A Friendly Guide

β€œWhen I first heard about Kubernetes, it sounded like a sci-fi robot’s name. But soon I realized it’s more like the traffic police of our applications – making sure everything runs smoothly, no matter how messy the road gets.”

Hello everyone πŸ‘‹,
In this post, I’ll walk you through Kubernetes (K8s) in the simplest way possible. If you’re just starting, don’t worry – I’ll cover the what, why, and how in plain English and then show you how to set it up on Windows, Linux, and Mac.


🌱 What is Kubernetes?

Think of Kubernetes as a system manager for your apps.

In short β†’ Kubernetes = Container Orchestrator 🎢


πŸ€” Why Learn Kubernetes?


πŸ› οΈ Installing Kubernetes Locally

We’ll use Minikube (a lightweight tool to run Kubernetes on your laptop). It sets up a local cluster where you can practice.

1️⃣ Prerequisites for All Systems


πŸ’» For Windows

  1. Install Docker Desktop for Windows.
  2. Install Chocolatey (Windows package manager):
    Set-ExecutionPolicy Bypass -Scope Process -Force; `
    [System.Net.ServicePointManager]::SecurityProtocol = `
    [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
    iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    
  3. Install kubectl & Minikube:
    choco install kubernetes-cli
    choco install minikube
    
  4. Start Minikube:
    minikube start --driver=docker
    

πŸŽ‰ You now have a working Kubernetes cluster on Windows.


🐧 For Linux (Ubuntu/Debian example)

  1. Install dependencies:
    sudo apt update
    sudo apt install -y curl apt-transport-https
    
  2. Install Docker:
    sudo apt install -y docker.io
    
  3. Install kubectl:
    curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
    chmod +x kubectl
    sudo mv kubectl /usr/local/bin/
    
  4. Install Minikube:
    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
    sudo install minikube-linux-amd64 /usr/local/bin/minikube
    
  5. Start Minikube:
    minikube start --driver=docker
    

🍎 For macOS

  1. Install Homebrew if not installed:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install Docker Desktop (or Colima for a lightweight option).
  3. Install kubectl and Minikube:
    brew install kubectl
    brew install minikube
    
  4. Start Minikube:
    minikube start --driver=docker
    

🎯 Testing Your Cluster

Run:

kubectl get nodes

If you see minikube Ready, congratulations πŸŽ‰ – your first Kubernetes cluster is alive!

Deploy a simple app:

kubectl create deployment hello-k8s --image=nginx
kubectl expose deployment hello-k8s --type=NodePort --port=80
minikube service hello-k8s

You should see Nginx welcome page in your browser. Boom – you just deployed your first app with Kubernetes! πŸš€


πŸ“Œ What’s Next?


✨ Final Thoughts

Kubernetes can look intimidating at first, but once you break it down, it’s like playing Lego with containers. Start small with Minikube, deploy simple apps, and gradually explore advanced concepts like Ingress, ConfigMaps, and StatefulSets.

Stay tuned for my next blog.