VSHN.timer

VSHN.timer #11: Kubernetes in your Laptop

23. Sep 2019

Welcome to another VSHN.timer! Every Monday, 5 links related to Kubernetes, OpenShift, CI / CD, and DevOps; all stuff coming out of our own chat system, making us think, laugh, or simply work better.
In this edition we are going to showcase several solutions for developers to deploy Kubernetes clusters locally. Turns out there are a lot of them!
There are a lot of reasons why developers would want to run their cluster in their laptops: reducing latency and speeding up the development cycles are crucial factors for cloud-native apps. But it can also be useful for demos, training sessions and for quickly testing new ideas! The usual choices, mentioned here for the sake of completeness, are of course the venerable minikube (an integral part of the Kubernetes project) and Minishift (an open source Red Hat project). The thing is, minikube can be quite slow sometimes, and it requires an underlying virtual machine to run (usually VirtualBox as a cross-platform solution, or KVM for Linux hosts). Is there a better option to run a cluster locally?
1. The first one in the list is kind, also known as „Kubernetes in Docker“. Written in Go, available for Windows, macOS, and various Linux flavors and architectures. It is lightweight, extremely simple to install (just download the executable and run) and even easier to use (kind create cluster, export your KUBECONFIG variable and you are good to go). This tool has lots of potential; it is comprehensive, simple, and much faster than other options. Remember though, that the current version at the time of this writing is 0.5.1, and that many features (for example LoadBalancers) are not ready yet.
https://kind.sigs.k8s.io/
2. Another promising tool is Microk8s. It is an official Ubuntu project written in Python and shell script, steadily growing in popularity and contributions, but without any official release at the time of this writing. It even comes bundled with its own kubectl command, automatically configured to talk to your Microk8s cluster! And not only that; it also bundles Istio, Knative, Grafana, Kubeflow, Prometheus and many other tools out of the box. Being an Ubuntu project, it is based on Multipass and distributed as a Snapcraft package – of course! We have found, however, that the installation process is a bit cumbersome for macOS users (as it requires to manually provision a VM with Multipass before installing Microk8s). Other than that, it is reliable, simple and fast.
https://microk8s.io/
3. Nobody wants to miss on this market. That is why Rancher Labs has brought us k3s – an ultra-lightweight distribution of Kubernetes, targeting local development and IoT applications. And to make it even easier to use, they also created k3d, which runs k3s in Docker! Both k3s and k3d are written in Go. A simple k3d create will bring a new cluster to life, and after exporting the required KUBECONFIG variable, it is ready to be used with kubectl just like any other cluster. It looks really promising and it is available as version 1.3.1 at the time of this writing. However, in our experience it requires a bit more work to setup a complex cluster, since for example it doesn’t have a default storage class, and as such it can not provide any PVCs automatically.
https://k3s.io/
4. Since the release of Red Hat’s OpenShift 4 in May the industry has been waiting for a solution to deploy OpenShift 4 clusters locally, since Minishift is designed to work only with OpenShift 3. Well, Minishift has other issues as well; for example, the version of the Docker daemon bundled with it is 1.12, which means that multi-stage builds are not available. But the successor of Minishift arrived recently: it is called Red Hat CodeReady Containers and it is already available in version 1.0 beta at the time of this writing. Written in Go and available for Windows, macOS and Linux, it is the simplest way to run a complete OpenShift 4 cluster in your local laptop, batteries included.
https://github.com/code-ready/crc
5. Any other options? Of course! This field is incredibly dynamic, and new projects are popping up all the time; to mention a few: Docker Desktop with its „one checkbox“ integrated K8s for Windows and Mac; Banzai Cloud’s Pipeline Kubernetes Engine; Windmill Engineering’s Tilt; Kubermatic’s Container Engine; and NetApp’s Kubernetes Service… all working hard so that developing on Kubernetes does not suck!
https://blog.tilt.dev/2019/08/21/why-does-developing-on-kubernetes-suck.html
Do you use similar tools to run Kubernetes clusters locally? Are you satisfied with them? Do you have any best practices you would like to share with the community? Get in touch with us through the form at the bottom of this page, and see you next week for another edition of VSHN.timer.

Adrian Kosmaczewski

Adrian Kosmaczewski ist bei VSHN für den Bereich Developer Relations zuständig. Er ist seit 1996 Software-Entwickler, Trainer und veröffentlichter Autor. Adrian hat einen Master in Informationstechnologie von der Universität Liverpool.

Kontaktiere uns

Unser Expertenteam steht für dich bereit. Im Notfall auch 24/7.

Kontakt