Hysen Labs
Open-source project
k3s-io/k3s avatar
k3s-io

k3s

Lightweight Kubernetes

33,737 stars2,704 forksGoApache-2.0
01
DEEP OPEN-SOURCE ANALYSIS

K3s: Kubernetes with half the memory and a smaller binary

K3s is a Kubernetes distribution aimed at machines where a full cluster is overkill: edge devices, ARM boards, CI runners. The README explains how it stays conformant while cutting memory and binary size.

02
DEEP OPEN-SOURCE ANALYSIS

The pitch

Lightweight Kubernetes. Production ready, easy to install, roughly half the memory, all packed into a binary under 100 MB. The README lists the intended corners: edge, IoT, CI, development, ARM, embedded setups, and any place where running a full Kubernetes stack does not make sense. It even jokes that the name comes from cutting the ten letter word Kubernetes in half, leaving the five letter K3s.

03
DEEP OPEN-SOURCE ANALYSIS

How it stays small

Two main levers. Many components run inside a single process, which removes overhead that would otherwise be duplicated per component. The binary also drops third party storage drivers and cloud providers, both of which have out of tree alternatives like CSI and CCM. The project is careful to call itself a distribution rather than a fork, keeping its own patches well under 1000 lines and pushing fixes back upstream when possible, such as with SELinux support in containerd.

04
DEEP OPEN-SOURCE ANALYSIS

What changes under the hood

It ships as a single binary with sqlite3 as the default storage backend, while etcd3, MariaDB, MySQL, and Postgres remain supported options. A simple launcher wraps Kubernetes and its components. Worker nodes do not expose the kubelet API port, because that traffic reaches the control plane over a websocket tunnel. It is also secure by default with minimal OS dependencies, just a sane kernel and cgroup mounts.

05
DEEP OPEN-SOURCE ANALYSIS

Bundled components

The distribution comes with containerd and runc, Flannel for CNI, Traefik for ingress, an embedded service load balancer, a network policy controller, a Helm controller for CRD driven manifests, and a datastore shim called Kine that lets etcd be swapped for other databases. A local path provisioner handles volumes from local storage, and host utilities like iptables, ebtables, and socat are included.

06
DEEP OPEN-SOURCE ANALYSIS

Release cadence and install

K3s tracks upstream Kubernetes releases, aiming for patch releases within a week and new minors within 30 days. Versions carry a +k3s postfix to stay semver compliant when extra releases are needed against the same upstream version. A single install script downloads the binary, sets up a systemd or openrc service, and writes a kubeconfig to /etc/rancher/k3s/k3s.yaml.

07
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The interesting choice is keeping upstream Kubernetes compatibility while being honest about what gets removed and why. The release notes suggest a project that ships often and stays close to upstream.

08
DEEP OPEN-SOURCE ANALYSIS

Official sources

09
Community notes

Community notes