Favicon of K3s

K3s

K3s is a lightweight, CNCF-conformant Kubernetes distribution shipped as a single binary under 100MB, for edge, IoT, and CI.

K3s website screenshot
K3s GitHub repository preview

K3s is a production-ready, fully conformant Kubernetes distribution built for environments where running a full upstream Kubernetes cluster is overkill or impractical. It targets edge devices, IoT deployments, CI pipelines, local development, ARM hardware, and any project embedding Kubernetes as part of a larger product. If you want a cluster running in seconds without operating a control plane the size of a small data center, this is built for that.

Under the hood, K3s wraps the real Kubernetes components plus a curated set of defaults: containerd and runc for the runtime, Flannel for CNI, CoreDNS, Traefik for ingress, a local-path provisioner for storage, and an embedded service load balancer. It uses sqlite3 as its default datastore instead of etcd, though etcd3, MySQL, MariaDB, and Postgres are all supported if you need something more distributed. Everything ships as one binary with minimal OS dependencies, so there's no complex install of separate services to keep in sync.

K3s isn't a fork. It tracks upstream Kubernetes closely and maintains a small patch set (well under 1000 lines), contributing changes back upstream where it makes sense. The main things stripped out are in-tree storage drivers and in-tree cloud providers, both replaceable with CSI and CCM equivalents, which keeps the binary small without breaking conformance.

Key features

  • Single binary packaging: server, agent, and all bundled components ship in one binary under 100MB.
  • Lower memory footprint: many components run inside one process, cutting the overhead of running them separately.
  • Flexible datastore: defaults to sqlite3 for simplicity, with etcd3, MySQL, MariaDB, and Postgres as alternatives via the Kine shim.
  • Batteries included: bundles containerd, Flannel, CoreDNS, Metrics Server, Traefik, Klipper-lb, kube-router network policy, and Helm-controller for CRD-driven Helm deployments.
  • Secure defaults: reasonable out-of-the-box security settings for lightweight environments, including a websocket tunnel that avoids exposing kubelet API ports on worker nodes.
  • Automatic manifest deployment: local manifests are auto-applied and kept in sync in realtime.
  • Multi-arch support: builds available for x86_64, armhf, arm64, and s390x.
  • Swappable components: any bundled technology (CNI, ingress, load balancer, etc.) can be disabled or replaced.

Ideal use cases

K3s fits well when you need a real Kubernetes API without the operational weight of a full cluster: single-node or small multi-node edge deployments, IoT gateways, CI/CD pipelines that spin clusters up and tear them down, local development environments that mirror production Kubernetes behavior, and ARM-based devices where resources are constrained. It's also a reasonable choice if you're embedding Kubernetes inside another product and don't want to manage a separate heavyweight control plane.

It's not the right fit if you need every in-tree cloud provider integration or in-tree storage driver that upstream Kubernetes ships, since those are deliberately removed (use CSI/CCM instead). Large-scale, multi-hundred-node production clusters with heavy customization needs may be better served by a full kubeadm-based setup or a managed cloud Kubernetes offering, where the ecosystem of tooling assumes vanilla upstream behavior.

Installation

The quickest path is the install script, which sets up K3s as a systemd or openrc service:

curl -sfL https://get.k3s.io | sh -

This writes a kubeconfig to /etc/rancher/k3s/k3s.yaml and starts the service. It also installs kubectl, crictl, k3s-killall.sh, and k3s-uninstall.sh.

sudo kubectl get nodes

The server node's join token lives at /var/lib/rancher/k3s/server/node-token. To join a worker node, pass the server URL and token:

curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=XXX sh -

For a manual setup, download the k3s binary from the latest GitHub release (x86_64, armhf, arm64, or s390x), then run:

sudo k3s server &
sudo k3s kubectl get nodes

# on another node, join using the server's node-token
sudo k3s agent --server https://myserver:6443 --token ${NODE_TOKEN}

Full documentation, including architecture details and a quick-start guide, is available at docs.k3s.io.

Frequently asked questions

Share:

Stars
33.6K
Forks
2.7K
Last commit
20 hours ago
Repository age
8 years
License
Apache-2.0
Self-hosted
Yes
Activity score
84/100
View Repository
Ad
Favicon

 

  
 

Similar to K3s

Favicon

 

  
 
Favicon

 

  
 
Favicon