Simple Comparison of Lightweight K8S Implementations

Alperen Bayramoğlu
4 min readJun 30, 2023

--

There are several Kubernetes implementations in the tech world. In this article, I will simply compare different Kubernetes implementations in a summary.

Photo by Growtika on Unsplash

Minikube

  • It can work in the operating systems other than Linux.
  • The setup is pretty straightforward.
  • By default, it creates a single node cluster but this behavior can be changed by supplying the ` — nodes` parameter.
  • It’s not suitable for production but can be used in a test environment.
  • Maintained by main Kubernetes project.
  • Kubernetes version may be specified with the `— kubernetes-version` parameter.
  • Supports multiple container runtimes. (e.g. CRI-O, containerd, docker)
minikube start
minikube status
minikube dashboard
minikube stop
minikube pause
minikube delete

Website: https://minikube.sigs.k8s.io/docs/
GitHub Repository: https://github.com/kubernetes/minikube
GitHub Stars: 26.8k

Note: We should use the `CSI Hostpath Driver` extension, for a multinode cluster. (See also: Minikube Tutorials Multinode)

K3S/K3D

  • Developed by Rancher, for mainly IoT and Edge devices.
  • It can work on most modern Linux systems.
  • It provides a VM-based Kubernetes environment. We should manually edit nodes and virtual machines for multiple K8S servers.
  • It is suitable for testing the production environment locally.
  • It is lightweight and has a low memory footprint due to excluding some features from the Kubernetes binary.
  • It has an auto-deployment feature. We can deploy the Kubernetes manifests and helm charts by putting them in a specific directory.
  • It uses SQLite as a default storage backend rather than etcd3.
  • It has some features like Local Storage Provider, Service Load Balancer, Helm Controller, etc.
  • It is generally used in performance-constraint environments like IoT devices.

Website: https://k3s.io/
GitHub Repository: https://github.com/k3s-io/k3s
GitHub Stars: 23.4k

K3D is a lightweight wrapper for managing K3S nodes that work in a docker container.

Website: https://k3d.io/
GitHub Repository:https://github.com/k3d-io/k3d
GitHub Stars: 4.5k

sudo k3s server &
k3s agent --server https://k3s.example.com --token mypassword
k3d cluster create myk3dcluster

MicroK8S

  • It is lightweight K8S, developed by Canonical(a.k.a. Ubuntu)
  • It sets the cluster to multiple master clusters automatically if the node count exceeds three.
  • It is suitable for Edge and IoT devices.
  • It is only for Linux-based operating systems because it is not VM involved, and works as the snaps.
  • It is mainly focused on simplicity and performance.
  • It ships with several self-addons. (e.g. Dashboard)
sudo snap install microk8s --classic
microk8s start
microk8s kubectl get nodes
microk8s enable dashboard

Website: https://microk8s.io/
GitHub Repository: https://github.com/ubuntu/microk8s
GitHub Stars: 7.5k

KinD

  • It means Kubernetes-IN-Docker. It runs k8s inside a docker container.
  • It supports high availability and multi node clusters.
  • It is developed by official Kubernetes project maintainers.
  • It is primarily optimized for CI pipelines.
  • Due to starting a cluster in a docker container, it can start faster compared to the VM alternatives.
  • It ships with `kindnetd` as the default CNI plugin but others can be used as well.
kind get nodes
kubectl get nodes
kind delete cluster
docker exec -it kind-control-plane bash

Website: https://kind.sigs.k8s.io/
GitHub Repository: https://github.com/kubernetes-sigs/kind
GitHub Stars: 11.7k

K0S

  • It is certificated(CNCF) Kubernetes distribution works on any infrastructure (Cloud, Edge, IoT…)
  • Calico is the default CNI but `kube-router` also can be used.
  • It greatly reduces installing and running fully compatible Kubernetes distribution
k0s install controller
k0s kubectl get nodes
systemctl start k0scontroller.service

Website: https://docs.k0sproject.io/v1.27.2+k0s.0/
GitHub Repository: https://github.com/k0sproject/k0s
GitHub Stars: 1100+

Conclusion

  • Minikube is the easiest to use but it is not suitable for production.
  • For performance-constraint environments, K3S is easy to use the lightweight Kubernetes implementation.
  • MicroK8S offers more features in terms of usage but it is more difficult to configure and install than others.
  • MicroK8S could be a good duo with the Ubuntu operating system.
  • In resource-constrained environments, it is useful to consider also K0S.
  • K0S and K3S are similar though if a proper toolchain is in place K0S gives attention to security by providing 100% FIPS compliance.

Comparison Table

Why ? in KinD? See this issue

--

--

Responses (1)