Welcome to Your Kubernetes Journey
Before diving deep into Kubernetes, you need to understand the prerequisites and set up your local environment.
This guide walks you through everything you need to know to get started, from system requirements to installing
essential tools and creating your first local Kubernetes cluster.
Hardware Requirements
- CPU: Minimum 2 cores (4+ cores recommended)
- RAM: Minimum 4GB (8GB+ recommended)
- Disk Space: 20GB free space minimum
- Virtualization: VT-x/AMD-V enabled in BIOS
- Internet: Stable connection for downloading images
Operating Systems
- Linux: Ubuntu 20.04+, CentOS 7+, Debian 10+
- macOS: 10.15+ (Intel & Apple Silicon)
- Windows: Windows 10/11 with WSL2 or Docker Desktop
- Cloud: AWS, Azure, GCP instances
Essential Tools
- Docker: Container runtime
- kubectl: Kubernetes CLI tool
- Git: Version control
- curl/wget: Download utilities
- Text Editor: VS Code, vim, or similar
1. Install Docker
Docker is the container runtime that Kubernetes orchestrates.
For Linux (Ubuntu):
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
newgrp docker
For macOS:
brew install docker
# Or download Docker Desktop from https://www.docker.com/products/docker-desktop
For Windows:
Download Docker Desktop from https://www.docker.com/products/docker-desktop
Verify Installation:
docker --version
docker run hello-world
2. Install kubectl
kubectl is the command-line tool to interact with Kubernetes clusters.
For Linux:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
For macOS:
brew install kubectl
For Windows (using PowerShell):
choco install kubernetes-cli
# Or
scoop install kubectl
Verify Installation:
kubectl version --client
3. Install Local Kubernetes Cluster Tool
Choose one of the following for local development:
Option A: Minikube (Recommended for beginners)
# Install Minikube
curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# Start a cluster
minikube start
# Check status
minikube status
Option B: Kind (Kubernetes in Docker)
# Install Kind
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
# Create a cluster
kind create cluster
# List clusters
kind get clusters
Option C: Docker Desktop (Built-in Kubernetes)
If using Docker Desktop, simply enable Kubernetes in settings: Preferences → Kubernetes → Enable Kubernetes
kubectl Configuration
# View current context
kubectl config current-context
# List all contexts
kubectl config get-contexts
# Switch context
kubectl config use-context docker-desktop
# View kubeconfig
kubectl config view
# Set default namespace
kubectl config set-context \
--current --namespace=my-namespace
Namespace Setup
# Create namespaces
kubectl create namespace dev
kubectl create namespace staging
kubectl create namespace prod
# List namespaces
kubectl get namespaces
# Delete namespace
kubectl delete namespace dev
Shell Aliases
# Add to ~/.bashrc or ~/.zshrc
alias k=kubectl
alias kg='kubectl get'
alias kd='kubectl describe'
alias kl='kubectl logs'
alias ke='kubectl exec -it'
alias ka='kubectl apply -f'
alias kdel='kubectl delete'
Getting Started Checklist
- System meets hardware and OS requirements
- Docker installed and running
- kubectl installed and working
- Local Kubernetes cluster created (Minikube/Kind/Docker Desktop)
- Can connect to cluster with kubectl
- kubectl aliases configured in shell
- First pod deployed successfully
- Understanding of basic kubectl commands
Verify Installation & Deploy First Pod
# Check cluster status
kubectl cluster-info
kubectl get nodes
# Deploy a simple pod
kubectl run my-nginx --image=nginx:latest --port=80
# Check pod status
kubectl get pods
# Access pod logs
kubectl logs my-nginx
# Port forward to access
kubectl port-forward my-nginx 8080:80
# Clean up
kubectl delete pod my-nginx