Member-only story
Kubernetes
Creating a Local Development Kubernetes Cluster with K3D and Traefik Proxy
Also called the poor man’s Kubernetes

Motivation
Kubernetes clusters are not exactly cheap, can be complex to set up, and operate properly. For this reason, you may be tempted to reserve “true” online Kubernetes clusters for running your production workloads and have clusters running locally for development purposes.
In this post, we will explore different ways to easily set up a local Kubernetes cluster and the associated trade-offs that accompany them.
Local Kubernetes clusters challengers
Different solutions exist to run a Kubernetes cluster on your laptop. Let’s review a few of these.
Minikube
Minikube is the solution the Kubernetes project documentation advises you to use. It deploys a VM with a single node cluster. You pay the price of virtualization, as seen in the minimum requirements for the host machine (2 CPU, 2 Go RAM, 20 Gb storage)
This is a simple yet effective way to learn kubectl commands. For a long time, the single node implementation created some hurdles but the Minikube team introduced the multi-node as an experimental feature recently to help correct this issue.
Kind
Kind is another approach from the Kubernetes SIG to deploy a cluster locally. The trick here is to have the whole cluster jammed into a Docker container. Consequently, it’s easier to set up and faster to boot than Minikube. It supports all topologies of cluster from single node to multiple masters or workers.
Kind was first and foremost created for conformance testing and for use in CI pipelines which give you some nice features like the ability to load Docker images directly inside the cluster without needing to push to an external registry.
k3s / k3d
K3s is a lightweight fully conformant cluster. To achieve this minimalism, some trade-offs are made, including:
- The default storage for the Kube-apiserver is using SQLite instead of etcd