K3OS: pico Kubernetes operating system
Kubernetes has revolutionized the way to manage containerized workloads at scale. Kubernetes is the perfect tool when you need to scale horizontally, but what happens when you run Kubernetes on a 1GB RAM node? Things start to get cramped. By including K3s, a tiny Kubernetes distribution optimized to run on IoT or Edge devices, K3OS is a complete, pico operating system for Kubernetes.
K3s is “5 less than K8s”, a lightweight Certified Kubernetes Distribution. It is a relatively new (2019) distribution made by Rancher Labs (the developers behind Rancher). K3s has a pretty low footprint:
- Linux 3.10+
- 512 MB of ram per server
- 75 MB of ram per node
- 200 MB of disk space
- x86_64, ARMv7, ARM64
As you can see it is pretty tiny, and it has very low requirements. Most importantly it runs on ARMv7 and ARM64 (ARMv8/AArch64): this means it also runs fine on a Raspberry Pi!
k3OS is a Linux distribution designed to remove as much as possible OS maintenance in a Kubernetes cluster. It is specifically designed to only have what is need to run k3s. Additionally the OS is designed to be managed by kubectl once a cluster is bootstrapped. Nodes only need to join a cluster and then all aspects of the OS can be managed from Kubernetes. Both k3OS and k3s upgrades are handled by the k3OS operator.
K3OS is a Linux distribution built around K3S developed by Rancher Labs. It follow an immutable infrastructure approach to provide an operating system that is both manageable and ready to host containers. As a matter of fact the most compelling feature of K3OS is the capability to manage operating system updates within Kubernetes. Most of the file system tree is read-only while the configuration is specified through cloud-init-like files written in YAML. The configuration files can be modified through scripts, the Kubernetes operator or manually.
The best way to get started is to look at the official documentation. However the procedure is quite streamlined:
- Get an installation mean ready (e.g. using an ISO image).
- Produce a configuration file and an ssh keypair.
- Install the operating system using the os-config utility.