DEV Community

cosckoya
cosckoya

Posted on

Kind: Tiniest Kubernetes ever!

Kind is the smallest, tiniest and funniest Kubernetes runtime I've tried.

Kind could be used for different purposes: to run a local environment, include as a stage on a CD/CD pipeline, test new Kubernetes releases for your OCI compliance images.

Kind requires Docker properly installed on your computer, otherwise it wont deploy anything.

Let's start creating a cluster!

First things to do is install Kind. There are a few ways to install it: Install Go language then run "go get" command or more easy to go, download latest release from the Github repository :D

I already automated this "download" task from my dotfiles, here is the "code":

mkdir ${HOME}/bin ;\
wget -q https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-linux-amd64 -O ${HOME}/bin/kind ;\
chmod u+x ${HOME}/bin/kind ;\
${HOME}/bin/kind version
Enter fullscreen mode Exit fullscreen mode

This will prompt you a message like this:

kind v0.10.0 go1.15.7 linux/amd64
Enter fullscreen mode Exit fullscreen mode

Next step is to create a cluster, to acknoledge this we must run this command:

CMD> kind create cluster --name tiny-k8s-01
Enter fullscreen mode Exit fullscreen mode

output

So, we now have a running Kind K8s cluster!

There a lot of funny features that makes Kind a versatile K8s tool, like:

  • Run as many K8s clusters as you want:
for i in {0..4}; do
kind create cluster --name tiny-cluster-0$i
done        
Enter fullscreen mode Exit fullscreen mode

Cluster list:

CMD> kind get clusters

tiny-cluster-00
tiny-cluster-01
tiny-cluster-02
tiny-cluster-03
tiny-cluster-04
Enter fullscreen mode Exit fullscreen mode
  • Create Kind cluster with different Kubernetes releases:
CMD> kind create cluster --image kindest/node:v1.19.7 --name tiny-cluster-v19
Enter fullscreen mode Exit fullscreen mode

Kind images are aviable in this DockerHub registry

There are a lot more features to be used with Kind like Ingress, build images and import into Kind, check your OCI rootless ...

Enjoy!

References:

Top comments (0)