Skip to content



We will need 1 VM to create a single node kubernetes cluster using kind. We are using following setting for this purpose:

  • 1 Linux machine, centos-7-x86_64, m1.medium flavor with 2vCPU, 4GB RAM, 10GB storage - also assign Floating IP to this VM.
  • setup Unique hostname to the machine using the following command:
echo "<node_internal_IP> <host_name>" >> /etc/hosts
hostnamectl set-hostname <host_name>

For example,

echo " kind" >> /etc/hosts
hostnamectl set-hostname kind

Install docker on CentOS7

Run the below command on the CentOS7 VM:

  • SSH into kind machine
  • Switch to root user: sudo su
  • Execute the below command to initialize the cluster:
yum -y install epel-release; yum -y install docker; systemctl enable --now docker;
systemctl status docker
docker version

Install kubectl on CentOS7

curl -LO "$(curl -L -s"
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
chmod +x /usr/bin/kubectl
  • Test to ensure the version you installed is up-to-date:
kubectl version --client

Install kind

curl -Lo ./kind
chmod +x ./kind
mv ./kind /usr/bin
which kind

kind version

kind v0.11.1 go1.16.4 linux/amd64
  • To communicate with cluster, just give the cluster name as a context in kubectl:
kind create cluster --name k8s-kind-cluster1

Creating cluster "k8s-kind-cluster1" ...
 ✓ Ensuring node image (kindest/node:v1.21.1) đŸ–ŧ
 ✓ Preparing nodes đŸ“Ļ
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹ī¸
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-k8s-kind-cluster1"
You can now use your cluster with:

kubectl cluster-info --context kind-k8s-kind-cluster1
Thanks for using kind! 😊
  • Get the cluster details:
kubectl cluster-info --context kind-k8s-kind-cluster1

Kubernetes control plane is running at
CoreDNS is running at
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
kubectl get all

service/kubernetes  ClusterIP   <none>       443/TCP  5m25s
kubectl get nodes

NAME                             STATUS  ROLES                AGE    VERSION
k8s-kind-cluster1-control-plane  Ready  control-plane,master  5m26s  v1.21.11

Deleting a Cluster

If you created a cluster with kind create cluster then deleting is equally simple:

kind delete cluster