Setting Up Your First Kubernetes Cluster

You can learn Kubernetes without a cloud account or expensive hardware. Several tools let you run a full cluster on your laptop. This topic walks you through the most popular options and gets you to a running cluster step by step.

Choosing the Right Tool for Local Development

Three tools dominate local Kubernetes development. Each has a different focus:

ToolBest ForOS SupportDifficulty
MinikubeLearning, single-node clusterWindows, Mac, LinuxBeginner-friendly
kind (Kubernetes in Docker)Testing, CI pipelinesWindows, Mac, LinuxModerate
k3sLightweight production-like setupLinux, Raspberry PiModerate

This guide uses Minikube because it is the easiest starting point and has the most beginner documentation.

What Minikube Does

Minikube creates a single-node Kubernetes cluster inside a virtual machine (or a Docker container) on your laptop. It runs both the control plane and the worker node on that one machine. It is not production-grade, but it is perfect for learning.

Your Laptop
┌──────────────────────────────┐
│         Minikube VM          │
│                              │
│  Control Plane + Worker Node │
│  ┌────────┐  ┌────────┐      │
│  │  Pod   │  │  Pod   │      │
│  └────────┘  └────────┘      │
└──────────────────────────────┘

Step 1: Install the Prerequisites

You need two tools before installing Minikube:

Install Docker

Download Docker Desktop from the official Docker website at docker.com. Install it and make sure Docker is running — you will see the Docker whale icon in your system tray or menu bar. Minikube uses Docker to run the cluster node.

Install kubectl

kubectl is the command-line tool you use to talk to your cluster. Install it using the instructions on the official Kubernetes documentation site at kubernetes.io/docs/tasks/tools. Pick the installer for your operating system.

After installation, verify kubectl works:

kubectl version --client

You should see a version number printed. That confirms kubectl is installed correctly.

Step 2: Install Minikube

Go to minikube.sigs.k8s.io and follow the installation steps for your operating system. The site offers one-line install commands for Mac (using Homebrew), Windows (using winget or a direct download), and Linux.

After installation, verify it works:

minikube version

Step 3: Start Your Cluster

One command starts everything:

minikube start

Minikube downloads the Kubernetes components, creates the virtual machine, and starts the cluster. This takes 2–5 minutes on the first run. You will see progress messages as each component starts.

When it finishes, your terminal shows:

Done! kubectl is now configured to use "minikube" cluster

Step 4: Verify the Cluster Is Running

Check that your cluster is healthy with these commands:

kubectl get nodes

Output:

NAME       STATUS   ROLES           AGE   VERSION
minikube   Ready    control-plane   2m    v1.29.0

The status says Ready. Your cluster is live.

kubectl cluster-info

This prints the URL of your API Server. It confirms kubectl can reach the cluster.

Step 5: Deploy a Test Application

Deploy a simple web server to confirm everything works end to end:

kubectl create deployment hello-k8s --image=nginx

Check that the Pod is running:

kubectl get pods

Output:

NAME                         READY   STATUS    RESTARTS   AGE
hello-k8s-5d8f9c7b4-xk2pz   1/1     Running   0          30s

Expose it so you can open it in a browser:

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

Minikube opens the nginx welcome page in your browser. Your Kubernetes cluster just served a web page.

Understanding the Minikube Dashboard

Minikube includes a visual dashboard that shows your cluster in a browser window. Launch it with:

minikube dashboard

The dashboard shows your Pods, Deployments, Services, and resource usage. It is a helpful tool when you are learning and want to see what is happening visually without remembering every command.

Useful Minikube Commands

CommandWhat It Does
minikube startStarts the cluster
minikube stopStops the cluster (saves state)
minikube deleteDeletes the cluster completely
minikube statusShows cluster health
minikube sshOpens a shell inside the Minikube VM
minikube addons listShows available addons (metrics server, ingress, etc.)

Cloud-Based Cluster Options

When you are ready to practice on a real cluster, three managed Kubernetes services make setup easy:

  • Google Kubernetes Engine (GKE) — Google Cloud's managed Kubernetes. Generous free tier for new accounts.
  • Amazon EKS — AWS's managed Kubernetes. Widely used in enterprises.
  • Azure AKS — Microsoft Azure's managed Kubernetes. Good integration with Windows workloads.

All three services handle the control plane for you — you only manage the worker nodes and your applications.

Key Points

  • Minikube runs a complete Kubernetes cluster on your laptop — perfect for learning.
  • You need Docker and kubectl installed before starting Minikube.
  • One command — minikube start — creates and starts your cluster.
  • Use kubectl get nodes and kubectl get pods to verify everything is running.
  • Cloud providers offer managed Kubernetes services when you are ready to move beyond local development.

Leave a Comment