If you ever wanted to use Kubernetes in an edge or internet of things scenario, K3, Rancher’s latest open source project, might be worth checking out.
The newly introduced Kubernetes distribution comes in the shape of a less than 40MB binary packing everything you need to run. It is supposed to require less than 512MB of RAM to run, making it a better-than-usual candidate for low-resource computing.
To get it this small, the Rancher team has been busy removing all the code deprecated or disabled by default, along with pretty much everything out of the ordinary like non-default storage drivers or admission controllers – though they can be brought back in via out of tree addons if needed.
It also combined the processes typically running on Kubernetes management servers into a single one, which is bad for modularity, but should help conserve RAM. On top of that K3 uses containerd instead of Docker and offers SQLite as a low memory alternative to etcd.
The project is – at a version number of 0.1 – still in its very early stages, but intended to become a production ready, CNCF certified distribution. At the moment aspects like etcd as well as the metrics API not actually working or missing high availability features still stand in the way of this goal.
However, since during a call Rancher co-founder Sheng Liang mentioned possibilities like setting up easily extendable single node clusters, K3s might quickly become interesting to anyone bemoaning the lack of such setups for edge computing or embedded use cases, once it gets of the ground.
According to Liang, the project came about when the company stumbled upon an edge computing use-case by US fast-food chain Chic-a-filet that made use of the Rancher Kubernetes engine RKE. A closer look at other customer’s technology stacks, like the one of wind turbine manufacturer Goldwind, who seem to run Kubernetes in turbines with only little resources at hand, made clear that it was at least worth a try.
Apart from the internet of things, aggregation points for telecommunication, and similar scenarios, K3 might also come in handy for CI environments or as a way of bundling Kubernetes into applications – similar to packaging application servers into projects in the olden days.
The project comes in three flavours, supporting x86_64, ARM64, and ARMv7 architectures, which shouldn’t come as a surprise given the company announced a partnership with ARM back in December 2018. It doesn’t require external installers but makes use of containerd, Flannel, CoreDNS, CNI, as well as utilities offered by the host system.
Of course Rancher isn’t the first to step into the world of low-resource K8s, since for example kubeadm includes binaries to run on amd64 and ARM64. K3s however aims to become a production grade Kubernetes distribution including automatic certificate generation and simple ways of adding new nodes to a cluster. Maybe it will even become an official Rancher product at some point, but for now it only exists as another part of the open source world.