Prerequisites
System Requirements¶
Kubernetes has specific hardware and software prerequisites depending on your use case (local development, cloud, or production).
Operating System:
- Linux: Ubuntu 20.04+, CentOS 8+, or Red Hat Enterprise Linux (RHEL) 8+.
- macOS: Requires Docker Desktop (with Linux containers enabled).
- Windows: Requires Docker Desktop (Windows 10 64-bit with Hyper-V enabled).
Hardware:
- Minimum 2 CPU cores, 4 GB RAM (for local clusters like Minikube).
- Recommended: 20GB disk space for container images and logs.
Kernel Requirements:
- Linux: Kernel version 5.1+ (verify with uname -r).
Docker Installation¶
Docker is required for running Kubernetes locally (e.g., with Minikube or KubeADM).
Install Docker on Linux¶
Ubuntu/Debian:
sudo apt update
sudo apt install -y docker.io
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
CentOS/RHEL:
Install Docker on macOS¶
- Download Docker Desktop from https://www.docker.com/products/docker-desktop.
- Enable Linux containers in Docker Desktop preferences (Preferences > Resources > Advanced).
Install Docker on Windows¶
- Ensure Hyper-V is enabled (Settings > Update & Security > Recovery > Advanced startup > Restart now > Troubleshoot > Advanced options > UEFI Firmware Settings).
- Download Docker Desktop from https://www.docker.com/products/docker-desktop and install.
Verify Docker Installation¶
kubeconfig Setup¶
The kubeconfig file is used by kubectl to communicate with your Kubernetes cluster.
Set KUBECONFIG Environment Variable¶
Verify kubeconfig Configuration¶
Note: For local clusters (e.g., Minikube), run minikube kubeconfig to automatically generate the kubeconfig file. For cloud providers (e.g., AWS EKS, GCP GKE), the kubeconfig is provided by the service.
Validate Environment¶
Ensure Docker and Kubernetes tools are functional: