kind is a tool for running Kubernetes clusters locally using Docker containers as nodes. In this tutorial, we will cover deploying a Kubernetes cluster using kind.
Video tutorial can be found here
Git Repository can be found at https://git.everythingkubernetes.info/everythingkubernetes/kind
Ensure you have the following packages installed, these are typically available as part of your Linux distribution:
Install the packages with our package manager:
sudo dnf -y install golang podman git
export PATH=$PATH:$(go env GOPATH)/bin
Install the kind binary using its go package:
go install sigs.k8s.io/kind@v0.20.0
Clone the repository containing the kind configuration file. This will configure a KIND cluster with one control plane node and three workers.
git clone https://git.everythingkubernetes.info/everythingkubernetes/kind.git
cd kind
Using the kind binary, create the cluster:
kind create cluster -n demo --config kind.yaml --image kindest/node:v1.24.15 --kubeconfig ./.kube/config
The version of kubectl used to interact with the cluster should match the cluster version. The Dockerfile included in the repository build a container image containing kubectl. Modify the release version to match the cluster version:
podman build --tag utility .
podman run -it --net host -h utility -v .kube/:/root/.kube/:Z -v ./:/work:Z -w /work utility
Using kubectl to interact with the cluster, obtain a list of nodes.
kubectl get nodes
In the next lesson we'll learn how to do some simple tasks