Few months ago I wrote an article about replacing Minikube with MicroK8s , but now we have even better soluion, kind . Like dind allows running Docker inside Docker containers, kind allows running Kubernetes inside Docker containers. kind basically abstracts nodes as Docker containers and then runs Kubernetes inside.

After you install Golang , it is quite easy to install and setup kind:

1
2
GO111MODULE="on" go get sigs.k8s.io/kind@v0.5.1
kind create cluster

After some 30 seconds your single node cluster will be ready for development and testing. But that’s not all, kind allows much complex setup, for example three node cluster with one master and two workers. Let’s first create declarative object:

1
2
3
4
5
6
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
- role: worker
- role: worker

Save it as cluster.yaml and run the following command:

1
kind create cluster --config cluster.yaml --name multinode

Yes, it is easy as that. If you are Golang developer, it is nice to know that kind also provides library to be used in Go. You can find more information watching this video .