I was reflecting on which options we have to run Kubernetes locally in my macOS. I know that on Linux the options are much more flexible because Linux is the Kubernetes home.
Unfortunately, I have to work with macOS as most of the Engineers that I have contact with. Looking for attending my requirement I made an analysis of Docker Desktop, Minikube, and Kind to understand what is the best option to run my Kubernetes Cluster.
Docker Desktop for macOS
This option looks like so famous in the macOS users.
I installed and starts using to build some containers, start others, and making some simple tests that apparently were perfect until I enable the Kubernetes feature. After some minutes waiting for the Kubernetes cluster creates I can see how slowly my laptop was going gradually down. Trying using kubectl to install some apps or just simple commands like logs or list deployments apparently is not locally anymore based in the time to output.
Some days researching what is happening with my laptop, the latest Apple MacBook 16" 2020, I decided to disabled the Kubernetes feature to use what is good, docker support for mac.
Docker Desktop for mac decided to offer kubernetes cluster running into one Linux Virtual Machine that makes clear why it was so slow not only the creating time but in the runtime also.
Trying to find an alternative to Docker Desktop for mac I tested the Minikube, the pioneer tool to run the Kubernetes cluster locally. The first impressions are that the time of creating a cluster is a little bit better, the kubeclt output not bad at all. The Minikube adds a new requirement to my deployment. I have to install the HyperKit, VirtualBox, or VMware Fusion. I chose for VirtualBox but it doesn’t allow me to be agile as I want to create and delete clusters on the fly, I want to test different images, releases and destroy and recreate everything from scratch to makes sure that my provisioning code is correct. All the time, I have to wait for a reasonable time to create a new cluster as a Virtual Machine.
After these tests and got this impression I decided to delete the Minikube and VirtualBox also.
Kind was the last hope that can’t deception me, I was thinking.
Reading the project drew me the attention: “kind is a tool for running local Kubernetes clusters using Docker container ‘nodes’.” WoW, it is exactly what I need, something that can be faster than I had tested before. I discovery that Kind is used to test Kubernetes itself.
With some info that definitely sounds good, I started my tests installing the Kind, that looks easier:
$ brew install kind
To create a new Kubernetes cluster:
$ kind create cluster
Faster and easier as I wish. Getting the name of the cluster created:
$ kind get clusters
To start using my kubectl command I only need to change the context:
$ kubectl cluster-info — context kind-kind
Finally, I found the perfect tool for my needs. If you want a tool light as Kind I strongly recommend you replace your Minkube or Docker Desktop for mac for Kind.