Rancher Labs Unveils Lightweight Kubernetes for Edge and IoT Use Cases

The latest offering from Rancher Labs aims to improve management for small manage Kubernetes clusters, specifically those tailored for edge and Internet of Things projects.  IDN looks at the company’s k3 light-weight Kubernetes distro.

Tags: clusters, Docker, edge, IoT, Kubernetes, management, Rancher Lab,

The latest offering from Rancher Labs aims to improve management for small manage Kubernetes clusters, specifically those tailored for edge and Internet of Things projects.


Rancher Labs k3 is a “certified” Kubernetes light-weight distribution designed for production workloads in unattended, resource-constrained, remote locations or inside IoT appliances. It is also designed for simplified operation, said Rancher Labs CEO and co-founder Sheng Liang. 


k3s is wrapped in a simple package that reduces the dependencies and steps needed to run a production Kubernetes cluster. Packaged as a single binary, k3s makes installation and upgrade as simple as copying a file. Further, TLS (Transport Layer Security) certificates are automatically generated to ensure that all communication is secure by default.


“With more than 30,000 wind turbines in production, we are excited to see the creation of k3s, which can potentially allow us to deploy Kubernetes clusters on thousands of edge locations,´ Liang said in a statement. Everything necessary to install Kubernetes on any device is included in a single, 40mb binary, he added. “There is no requirement for an external installer like KubeSpray, KubeADM or RKE.”


Under the Covers;  How Rancher Labs Built Lightweight k3 for IoT, Edge

Rancher Lab’s architectural approach to k3 is described in a blog from Darren Shepherd.  k3s bundles the Kubernetes components (kube-apiserver, kube-controller-manager, kube-scheduler, kubelet, kube-proxy) into combined processes that are presented as a simple server and agent model. It can start the Kubernetes server and automatically register the local host as an agent, which creates a one-node Kubernetes cluster. Users can add more nodes or another host that will join the cluster.


All this engineering is aimed at letting k3 break through many barriers that often prevent or constrain the use of Kubernetes for IoT projects, Liang added. 

“Existing Kubernetes distributions are often memory intensive and overly complex for edge computing environments. In the last year, we’ve worked with dozens of teams who see Kubernetes as an ideal platform for managing edge infrastructure but have been reluctant to commit a large portion of resources in their edge devices to run a full-fledged Kubernetes platform.


With k3s, we can provide these teams with a distribution of Kubernetes that requires less than 512 MB of RAM and is ideally suited for edge use cases. We see significant demand for k3s among organizations in the retail, finance, telco, utility and manufacturing sectors.”

To reduce the memory required to run Kubernetes, k3s focused on four primary changes:

Removing old and non-essential code: k3s does not include any alpha functionality that is disabled by default or old features that have been deprecated, such as old API groups, which are still shipped in a standard deployment. Rancher also removed all non-default admission controllers, in-tree cloud providers, and storage drivers, opting instead to allow users to add in any drivers they need.


Consolidating the packaging of running processes: To conserve RAM, Rancher combined the processes that typically run on a Kubernetes management server into a single process. Rancher has also combined the Kubelet, kubeproxy and flannel agent processes that run on a worker node into a single process.


Using containers instead of Docker as the runtime container engine: By substituting containerd for Docker, Rancher was able to cut the runtime footprint significantly, removing functionality like libnetwork, swarm, Docker storage drivers and other plugins.


Introducing SQLite as an optional datastore in addition to etcd: Rancher added SQLite as optional datastore in k3s to provide a lightweight alternative to etcd that has both a lower memory footprint, as well as dramatically simplified operations.

k3s is a fully compliant production-grade Kubernetes distribution, optimized for ARM: Both ARM64 and ARMv7 are supported with binaries and multiarch images available for both. k3s works great from something as small as a Raspberry Pi or as large as an AWS a1.4xlarge 32GiB server.


With a single command, a single-node k3s cluster can be provisioned or upgraded.  Further, all of the certificates needed to establish TLS between the Kubernetes masters and nodes are automatically created when a cluster is launched. Encryption keys for service accounts are also automatically created.