Kubernetes - Install Kind & Create a Multi-node Cluster
Kind (Kubernetes in Docker), is an open-source tool for running Kubernetes clusters locally using Docker containers as the cluster nodes.
Note: This installation is done in AWS ec2 medium ubuntu 24.04?
Step 1: Install Docker in Ubuntu
To install kind we need to install docker first.
sudo apt-get update
sudo apt-get install docker.io
If you run docker ps now you will get Permission denied:
once this is installed we need to add the current user to the docker group.
Just check the current user with this command: whoami
Add the user to group:
sudo usermod -aG docker $USER
Refresh the group:
newgrp docker
you can test by running a command -?
docker --version
Step 2: Install Kind
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64
# For ARM64
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
Versions will be updating regularly for latest versions check this:
Step 3: Install Kubectl
Kubectl is the command line tool for managing Kubernetes cluster
curl -LO https://dl.k8s.io/release/v1.32.0/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin
kubectl version --client
Check for latest version
Step 4: Create a configuration file: config.yml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
Step 5: Create the Multi-node cluster using config.yml
kind create cluster --name=simple-multinode-cluster --config=config.yml
Now the Multi-node cluster is created.
Check the cluster info:
kubectl cluster-info --context kind-simple-multinode-cluster
Display the nodes in the cluster:
kubectl get nodes