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:
GO111MODULE="on" go get email@example.com 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:
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:
kind create cluster --config cluster.yaml --name multinode