Skip to content

External runtime dependencies#

k0s is packaged as a single binary, which includes all the needed components. All the binaries are statically linked which means that in typical use cases there's an absolute minimum of external runtime dependencies.

However, depending on the node role and cluster configuration, some of the underlying components may have specific dependencies, like OS level tools, packages and libraries. This page aims to provide a comprehensive overview.

The following command checks for known requirements on a host (currently only available on Linux):

k0s sysinfo

A unique machine ID for multi-node setups#

Whenever k0s is run in a multi-node setup (i.e. the --single command line flag isn't used), k0s requires a machine ID: a unique host identifier that is somewhat stable across reboots. For Linux, this ID is read from the files /var/lib/dbus/machine-id or /etc/machine-id. For Windows, it's taken from the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid. If neither of the OS specific sources yield a result, k0s will fallback to use a machine ID based on the hostname.

When running k0s on top of virtualized or containerized environments, you need to ensure that hosts get their own unique IDs, even if they have been created from the same image.

Linux specific#

Linux kernel configuration#

Needless to say, as k0s operates Kubernetes worker nodes, there's a certain number of needed Linux kernel modules and configurations that we need in the system. This basically stems from the need to run both containers and also be able to set up networking for the containers.

The needed kernel configuration items are listed below. All of them are available in Kernel versions 4.3 and above. The list covers ONLY the k0s/kubernetes components’ needs on worker nodes. Your own workloads may require more.

cgroups#

Required cgroups controllers:

  • cpu
  • cpuacct
  • cpuset
  • memory
  • devices
  • freezer
  • pids

containerd needs apparmor_parser#

If containerd detects that the system is configured to use AppArmor it will require a tool called apparmor_parser to be installed on the system.

Other dependencies in previous versions of k0s#

  • up until k0s v1.21.9+k0s.0: iptables
    Required for worker nodes. Resolved by @ncopa in #1046 by adding iptables and friends to k0s's embedded binaries.

  • up until k0s v1.21.7+k0s.0: find, du and nice
    Required for worker nodes. Resolved upstream by @ncopa in kubernetes/kubernetes#96115, contained in Kubernetes 1.21.8 (5b13c8f68d4) and 1.22.0 (d45ba645a8f).

Windows specific#

TBD.