Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français

k0s: when to choose this lightweight Kubernetes distribution

By updated

Improve this page

k0s is a Kubernetes distribution shipped as a single binary with no system dependency, which the k0sctl tool installs on your machines from a YAML file. You choose it for a lightweight cluster described in a file you keep under version control: edge, continuous integration, a fleet of small machines. If you are learning Kubernetes, or if you aim for CIS compliance (the hardening benchmark of the Center for Internet Security), other choices fit better. This page helps you decide, then shows the installation from the official documentation in a few commands.

What you will learn

  • Recognize what k0s provides and how its control plane differs from kubeadm's.
  • Compare k0s with kubeadm, Kubespray, Talos and RKE2 on concrete criteria.
  • Choose k0s or another distribution for your needs.
  • Spot what changes when you operate a k0s cluster.

What does k0s do that kubeadm does not?

kubeadm initializes the control plane and leaves the rest to you, container runtime included. k0s takes a different approach: the architecture documentation describes a single binary that extracts itself and embeds the Kubernetes binaries, statically compiled, with no package and no dependency on the operating system. This binary also acts as the supervisor of all the control plane components.

What does k0s bundle in its single binary?

The k0s binary embeds the Kubernetes components, the container runtime (containerd and runc by default) and two network plugins. It also manages the etcd lifecycle itself: when a controller joins another one, k0s updates the etcd cluster membership. Thanks to kine, a layer that translates the etcd API to a SQL database, k0s also accepts databases other than etcd, such as SQLite or PostgreSQL, which lightens a small cluster.

Controller vs Worker

The most puzzling point about k0s fits in one sentence: by default, a controller runs neither a kubelet nor a container engine. The control plane components run there as plain processes, not as pods, and you cannot schedule any workload on it.

The visible consequence: after a deployment, kubectl get nodes lists only the workers. This is not an error, because a controller without a kubelet is not a Kubernetes node. It does not show up in kubectl get pods -n kube-system either, and CoreDNS and the network pods run on the workers. The --enable-worker option makes a controller a worker as well: the documentation specifies that it then automatically receives the node-role.kubernetes.io/control-plane:NoExecute taint.

When should you choose k0s, and when not?

The choice depends on the size of your machines and on how you want to describe the cluster. The table compares k0s with kubeadm and the other distributions of the module. K3s (in French) serves as a reference point: it is the other lightweight distribution.

NeedBest fitReason
Learn Kubernetes, pass the CKAkubeadmYou install every component yourself and see the cluster as the upstream documentation describes it
Small machines, edge, continuous integrationk0s or k3sThe stated minimum resources are lower than those of RKE2
Describe the whole cluster in a filek0sA single k0sctl.yaml describes the hosts, their roles and the version
Prove CIS or FIPS compliance (a US cryptography standard)RKE2The hardened settings are provided, with commercial support
Fleet managed by AnsibleKubesprayThe playbooks fit your existing inventory
Stop managing the operating systemTalosThe system is dedicated to Kubernetes and is driven through an API

The resource criterion is measurable. On 2026-11-13, the official documentation states a minimum of 1 GB of RAM and 1 vCPU for a k0s controller (k0s requirements), 2 GB and 2 cores for a k3s server (k3s requirements) and 4 GB and 2 CPUs for an RKE2 server (RKE2 requirements). These minimums are starting approximations: the real load raises them.

Do not choose k0s in two cases. If you want to understand every Kubernetes component, kubeadm shows them to you one by one. If you have to prove compliance in front of an audit, the k0s documentation describes a test with kube-bench in which some checks are ignored, whereas RKE2 offers a cis profile and a dedicated hardening guide.

Which version of k0s and Kubernetes today?

The latest k0s release found on GitHub on 2026-11-13 is v1.37.2+k0s.1, published on 2026-11-06. Its go.mod file references Kubernetes v1.37.2. The +k0s.1 suffix is k0s's revision number for that Kubernetes version. The latest k0sctl release, found the same day, is v0.33.1, published on 2026-09-21.

k0s appears in the CNCF conformance repository (cncf/k8s-conformance) for Kubernetes 1.37, like RKE2 and Talos. To rebuild the same cluster in six months, pin the k0s version in k0sctl.yaml, as in the demonstration below.

What does the installation look like?

This demonstration follows the Install using k0sctl page of the official documentation. It is not a graded task: it shows the shape of the installation. The task of installing a cluster is practiced with kubeadm.

Prerequisites on each server

k0sctl runs from your workstation, not on the servers. It connects to them over SSH, drops the k0s binary there and runs it. The k0sctl documentation therefore requires the SSH user to be root or to be able to use sudo without a password. Nothing else has to be preinstalled: no k0s agent, no container runtime, since k0s embeds containerd.

Creating the k0sctl.yaml file

The k0sctl init command writes a starter file. It describes the hosts, their role (controller or worker) and the SSH connection. Add the spec.k0s.version key to pin the k0s version.

Terminal window
k0sctl init > k0sctl.yaml
k0sctl.yaml
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: k0s-cluster
spec:
hosts:
- role: controller
ssh:
address: <controller-address>
user: <ssh-user>
keyPath: ~/.ssh/id_ed25519
- role: worker
ssh:
address: <worker-address>
user: <ssh-user>
keyPath: ~/.ssh/id_ed25519
k0s:
version: v1.37.2+k0s.1

Deploying the cluster

The k0sctl apply command reads the file, discovers the real state of the machines and does what it takes to reach the described state. It runs through named phases (connecting to the hosts, downloading k0s, initializing the cluster) and stops at the first one that fails, naming the host concerned. Running the command again on a cluster already in place therefore does not rebuild it: it only acts on the difference.

Terminal window
k0sctl apply --config k0sctl.yaml
k0sctl kubeconfig > kubeconfig
kubectl get pods --kubeconfig kubeconfig -A

The second command writes the administrator kubeconfig, a secret to protect. The third lists the system pods: on a new cluster, you should see CoreDNS, konnectivity-agent (the TCP proxy between the control plane and the workers), kube-proxy, the network pods and metrics-server, all placed on the workers.

What does k0s change for operations?

With kubeadm, you administer every node. With k0s, the k0sctl.yaml file becomes the source of truth: you edit the file, then run k0sctl apply again. The cost is a limit to know about: the k0sctl documentation specifies that it can only add nodes, not remove existing ones, and that it only operates on the hosts listed in the file. Deleting a host's entry therefore does not remove it from the cluster: the k0sctl repository describes the host's reset: true option to remove it explicitly.

Choosing the CNI (network)

k0s embeds two network plugins, kube-router (the default) and Calico, and accepts any plugin that complies with the CNI specification (the standard interface for configuring container networking) with provider: custom. This choice is made before initialization: the documentation states that the only way to change plugins afterwards is a full redeployment of the cluster.

Upgrading the cluster

There is no upgrade subcommand in k0sctl: you change the version in k0sctl.yaml then run k0sctl apply again, which compares the described state with the real state and upgrades the nodes, draining the workers before upgrading them. As with Kubernetes, you move up one minor version at a time; the general approach is described in upgrading a Kubernetes cluster.

Backing up and restoring

The k0s backup --save-path=<directory> command, run on a controller, backs up the certificates, the etcd content (or the kine database), the k0s configuration, the custom manifests and the Helm configuration. It does not cover the persistent volumes of the applications, which need a separate backup. See also backing up and restoring Kubernetes.

Restoring from a backup

If the cluster uses externalAddress, the address of the load balancer in front of the control plane, it must stay identical between the backup and the restore. The documentation gives the reason: all the worker components connect to this address and cannot be reconfigured.

Diagnostic commands

The control plane components are not pods: kubectl cannot see them. A controller's state is therefore read over SSH on the machine, with sudo k0s status, which reports the node's role and whether it runs workloads. When the API no longer answers, this command remains usable, because it does not go through Kubernetes.

High availability

A highly available k0s cluster uses at least three controllers to keep the etcd quorum, behind a single address for the Kubernetes API (externalAddress). The documentation describes several ways to provide it, including an external load balancer such as HAProxy. The principle is the one of the highly available control plane; the k0s documentation gives the exact configuration.

Key takeaways

  • k0s is a single-binary Kubernetes distribution with no system dependency, installed by k0sctl from a YAML file.
  • By default, a k0s controller runs neither a kubelet nor a pod: it does not appear in kubectl get nodes, and its state is read with sudo k0s status.
  • Choose k0s or k3s for a limited machine, kubeadm to learn, RKE2 for compliance, Kubespray for an Ansible fleet, Talos for an immutable system.
  • On 2026-11-13, the latest release is v1.37.2+k0s.1, which references Kubernetes 1.37.2; k0sctl is at v0.33.1.
  • The stated minimum for a controller is 1 GB of RAM and 1 vCPU, against 4 GB and 2 CPUs for RKE2.
  • k0sctl describes the desired state: running k0sctl apply again only acts on the difference, but deleting a host from the file does not remove it from the cluster.
  • Choose the network plugin before initialization: changing it means redeploying the cluster.
  • To restore a backup with externalAddress, keep the same external address.

Test your knowledge

The questions cover what sets k0s apart from the other distributions, the controller's role and how k0sctl works.

Knowledge check

Check what you have learned with this interactive quiz

7 questions
5 min
80% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer