🚀 Kubernetes Series – Day 6: Multi-Node Cluster Setup


"With a multi-node Kubernetes cluster, you're not just running containers, you’re simulating production at scale, right from your local machine."
If you're exploring Kubernetes and want to simulate a real-world, multi-node cluster locally, then kind
(Kubernetes IN Docker) is a perfect fit. It's lightweight, fast, and doesn’t require a cloud provider or a virtual machine setup. Today, we’ll go step-by-step to set up a multi-node cluster using kind.
🧱 What is kind?
kind
lets you run Kubernetes clusters inside Docker containers. Originally designed for testing Kubernetes itself, it's now widely used for local development and CI environments. You can spin up clusters in seconds and destroy them just as quickly, perfect for learning and experimentation.
📘 Official Docs: https://kind.sigs.k8s.io/
Step 1: Create a Single Node Cluster
Once kind and kubectl are installed, run the following command:
kind create cluster --name cluster-1
This command creates a basic single-node Kubernetes cluster. You can verify the cluster is up and running using:
kubectl cluster-info --context kind-cluster-1
However, this is just a single-node setup. If you're aiming to simulate a production-like environment, we need multiple nodes, especially worker nodes.
Step 2: Delete the Existing Single Node Cluster
Before moving to a multi-node setup, let’s delete the current one:
kind delete cluster --name cluster-1
This will clean up all resources associated with the cluster-1
cluster.
Step 3: Create a Multi-Node Cluster Configuration
To define a multi-node setup, we create a configuration YAML file. Open a new file:
vim cluster-config.yml
Paste the following content:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
This YAML file instructs kind to create a cluster with one control-plane node and two worker nodes.
Save and exit the file.
Now, use the following command to spin up the cluster:
kind create cluster --config cluster-config.yml
This process might take a minute or two as Docker pulls the required images and sets up containers.
Step 4: View Your Clusters and Contexts
To list the available clusters (contexts), use:
kubectl config get-contexts
By default, if no name is set in the config, kind names the cluster as kind-kind
. You’ll see it listed here.
To interact with a specific cluster (if you have more than one), you can switch contexts:
kubectl config use-context kind-kind
Step 5: Verify the Multi-Node Setup
You can confirm the number of nodes with:
kubectl get nodes
Expected output:
NAME STATUS ROLES AGE VERSION
kind-control-plane Ready control-plane 2m v1.29.0
kind-worker Ready <none> 2m v1.29.0
kind-worker2 Ready <none> 2m v1.29.0
This confirms you now have a 3-node Kubernetes cluster running locally with kind.
🧩 Why Multi-Node Matters
A single-node cluster is great for basic operations, but for realistic development or testing scenarios—like testing deployments, simulating node failures, or practicing scaling, multi-node clusters are essential.
Using kind with a config file makes this easy without the need for cloud resources.
Subscribe to my newsletter
Read articles from Nishank Koul directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
