Blog

Top 5 Open Source Tools for Local Development with Kubernetes

According to the latest Cloud Native Computing Foundation (CNCF) survey, published in 2021, 5.6 million developers use Kubernetes. Given the rate of Kubernetes adoption worldwide, it is safe to assume that this number has increased significantly since the results of this survey were published.  

The Kubernetes ecosystem has evolved tremendously over the past few years and companies have invested heavily in accommodating and easing the complexity of Kubernetes — or K8s, as stock Kubernetes distributions are commonly referred to. This ecosystem evolution has led to the creation of an unbelievable amount of tools out there designed to help Kubernetes developers and operators. But choosing the right tool for the right scenario is a job on its own.

In this article, I want to present my list of the top 5 open source tools for local development with Kubernetes that I always keep in my arsenal.

Let’s dig in!

K3s/K3d

The main issue with K8s that developers have to deal with is that K8s installs with all its components, whether you need them or not. It’s also highly complex and heavy, making it an unsuitable choice for resource-constrained environments. K3s, on the other hand, is a single binary that weighs between 50 and 100 MB, is easy to install and configure, and addresses many of the pain points with stock Kubernetes. Its partner in crime, K3d, is a tool for creating Kubernetes clusters in Docker.

K3s is basically Kubernetes with all unnecessary components stripped out, and this is how it manages to be so lightweight. Here, I need to clarify that K3s is not a fork. K3s is upstream Kubernetes with a few changes and improvements to fit certain environments like IoT and the edge.

Master Traefik Proxy with K3s in our Free CourseLearn the ins and outs of using Traefik Proxy in edge Kubernetes environments.Sign Up Today

There are many reasons why I included K3s on my top 5 list.

  • Its small size (up to 100MB) is possibly its most significant advantage.
  • The K3s binary contains the non-containerized components, making it smaller than K8s.
  • I can use a single command to install and deploy K3s, and it takes me less than 30 seconds to do so.
  • It has a simplified architecture mostly thanks to the self-contained single binary package,
  • K3s helps me automate the integration of multiple code contributions into a single project, making it a good choice for some of my projects that require Continuous Integration (CI).
  • Thanks to its small size and the smaller number of dependencies, K3s also has a smaller attack surface.
  • It comes with batteries included.
  • It’s very easy to update, another great side effect that comes from having a smaller number of dependencies.
  • I can bootstrap K3s with manifests to install after it comes online.

K3d compliments K3s’ capabilities nicely, and together, they become a handy tool for local development on Kubernetes. Following the K3s principles, K3d is extremely lightweight. It comes with a user-friendly CLI that allows you to create, run, and delete Kubernetes clusters with one or multiple nodes.

k0s/k0sctl

k0s is another upstream distribution of Kubernetes, also great for resource-constrained environments. Like K3s, k0s is packaged as a single binary and designed to be a smaller and lighter Kubernetes distro. k0sctl is its companion — a handy command-line tool designed for bootstrapping and managing k0s clusters.

The benefits I get from using k0s for my applications are in fact, similar to those of K3s.

  • k0s is a single binary that weighs 165MB that contains all core components and OS dependencies.
  • Although, by default k0s ships with the containerd runtime (same as K3s, by the way), it is highly flexible and supports a number of options for Container Runtime (CRI), Container Networking (CNI), and Container Storage Interface (CSI).
  • In container environments, malicious attacks can run from the worker nodes to the control plane. This is why one of the most important benefits of k0s, in my opinion, is the isolated control plane which follows container security best practices.

K3s and k0s are indeed very similar distros, with a few distinct differences — how control plane and worker nodes communicate being one of them. Then why do I use k0s and K3s for my projects, you ask? k0s is a great choice for staging clusters and, combined with k0sctl, it helps me set up multi-node clusters easily.

kind

kind stands for Kubernetes in Docker and is — well, you guessed it — a tool for running local k8s clusters in Docker containers. Initially, however, kind was designed to test Kubernetes. So, you can also use kind to run vanilla kubernetes on your laptop or on a CI.

kind ships with:

  • Go packages that implement cluster creation, image build, etc.
  • A command-line interface built on the Go packages
  • Docker images that run systemd, Kubernetes, etc.
  • The kubetest integration also built on the Go packages

The main advantage of kind, and the main reason I included it on this list, is in fact that I can use it to test Kubernetes itself. kind also allows me to load local container images into the local Kubernetes cluster. This saves me so much time and effort setting up a registry and pushing the images repeatedly. In my experience, kind is an excellent option for getting started with running Kubernetes clusters in local environments and CI pipelines.

The only difficulty I would identify specifically for beginner developers is that kind deploys the Kubernetes clusters inside the Docker container. This makes access to the cluster and network management a bit more difficult.

Docker Desktop

I have Docker Desktop installed on my Mac machine, and I use it to deploy workloads, leveraging the native Kubernetes integration. If your workflows heavily rely on the Docker CLI, then Docker Desktop is a great choice for you. Docker Desktop is platform-agnostic, and I love the level of community support it receives.

I will not go through the Docker Desktop feature set since this is very well-documented. I will, however, point out a couple of things you need to keep in mind when working with Docker Desktop:

  • There is a macOS compatibility issue where the volume performance is a bit slow when used on certain macOS hardware combinations.
  • The Docker Desktop terms for commercial use have been updated and, starting January 31st, 2022, organizations with more than 250 employees or more than $10 million USD in annual revenue will require a paid subscription.

Rancher Desktop

Rancher Desktop leverage K3s as a Kubernetes distribution and is a tool developed to have a friendly UI to manage the Kubernetes clusters.

With Docker Desktop changing the terms of commercial use, many companies out there started looking into alternatives. Rancher Desktop is indeed an excellent alternative. It is open source and enables you to learn, experiment, and test out Kubernetes container management by leveraging a virtual machine (VM) to run containerd or dockerd with Kubernetes.

Rancher Desktop comes with a nice set of features including:

  • Out of the box Kubernetes
  • Kubernetes version switching
  • Container Runtime switching
  • VM system resources can be configured on Mac and Linux
  • Docker Compose support
  • Port forwarding UI
  • Use of commonly-known Docker commands

Summing up

I understand that this is a very subjective list, and many of you would have included more, less, or even completely different tools that you consider essential for local development with Kubernetes. I hope that this article gave you a very quick and fundamental understanding of these tools and why you should try them for your projects.

In any case, I welcome your feedback and opinion on what this list should include. Head over to our Forum and let me know!

Ready to Simplify Cloud Networking ... for Free?2B+ downloads and 30k+ stars on GitHub say it all.Explore Traefik Proxy