In many development or CI/CD scenarios, you might want to simulate a multi-node Kubernetes Cluster without relying on managed services like EKS (AWS), AKS (Azure), or GKE (Google Cloud). Kind (Kubernetes IN Docker) is a lightweight tool that lets you run Kubernetes clusters locally using Docker containers as cluster nodes. It means there Kind will create different docker containers as Controller Plane and Worker Nodes. It's especially useful for testing multi-node configurations on a single host.
This guide walks you through setting up a multi-node Kubernetes cluster using Kind, its advantages, and how it compares to other tools in the Kubernetes ecosystem.
A Linux-based machine or an EC2 Instance (Ubuntu/Debian preferred)
Docker installed and running
Kind installed (https://kind.sigs.k8s.io)
Kubectl installed (https://kubernetes.io/docs/tasks/tools/)
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind versioncurl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --client
Create a file named multinode-k8s-cluster.yaml:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
kind create cluster --name multinode-k8s-cluster --config=multinode-k8s-cluster.yamlkubectl config current-context
kubectl cluster-info --context kind-multinode-k8s-cluster
kubectl get nodes
Feature | Kind | Minikube | k3s | Managed Services (EKS/AKS/GKE) |
|---|---|---|---|---|
Setup Time | Fast | Medium | Medium | Slow (Provisioning Time) |
Resource Usage | Low | Moderate | Low | High |
Multi-node Support | Yes | Yes | Yes | Yes |
Realistic Networking | Limited | Better | Good | Best |
Ideal Use Case | Local dev, CI/CD | Local dev | Edge, Dev/Prod | Production |
Internet Required | No | Partially | No | Yes |
Cost | Free | Free | Free | Pay-as-you-go |
Kind is an excellent tool for development, testing, and CI/CD environments. While it doesn't replicate all production behaviours (like full networking), it offers a quick, low-resource solution to test multi-node configurations. For lightweight experimentation or pipeline automation, Kind is one of the best choices available.
If you're looking to simulate a full Kubernetes cluster on a budget without any managed service lock-in, Kind is your go-to option.