K0S - Zero-Friction Kubernetes, now in General Release
The lightweight, single-binary, open source Kubernetes for IoT and datacenter has earned its first major version designation. Recent features include kube-router as default CNI, arm32 support, backups, and a simple but powerful new lifecycle manager!
"K0S was engineered to be modern and simple to run anywhere," says Miska Kaipiainen, project founder. "What people call 'lightweight' — which is, I guess, generally understood as the ability to start fast and run on low-power CPUs with less RAM — sort of falls out from building a modern distribution that takes advantage of what's in upstream Kubernetes, with this goal of really running wherever and however people want to run it."
"We've made configuration decisions aimed at broadening the scope of applications K0S is suited for," echoes Adam Parco, VP of Engineering at Mirantis. "A good example is that we've recently made kube-router the default choice for container networking. This was done because kube-router is small, fast, and because we can compile it to run on arm32 CPUs, which are in some very small devices, including Raspberry Pis prior to version 4 with only 2GB RAM. But we also enable easy switching to Calico CNI, which is actually required for TCP IP v6 support."
Released this week in its first major version, with (at present) 3.5K stargazers and 144 forks on GitHub, K0S is among the fastest-evolving projects in the CNCF Kubernetes ecosystem. While project insiders are calling this latest release "K0S 1.0" for short, the official designation (and go-forward plan for revision numbering) is K0S 1.21.0+k0s.0, where "1.21.0" refers to the upstream Kubernetes major and minor versions, and the trailing 0 is a k0s minor version.
Backup, Restore, and More
New in (and associated with) this release, besides Kubernetes 1.21, are several new features, including automated backup and restore of cluster configuration (basically, everything managed by k0s, which excludes only things like container volumes. Initiating a backup can be done with a single command, issued on a controller node:
k0s backup --save-path=<directory>
... where the named directory exists and is writable.
Other new features include provision of binary bundles for air-gapped installation.
k0sctl: Community-driven LCM
The global K0S community is busily adding value all around K0S, in particular with deployment tooling in Ansible and other automation frameworks. A major addition, this past quarter, has been k0sctl, a sophisticated, lightweight, open source lifecycle manager that runs under the command line on Linux, Mac, and on Windows.
k0sctl shares some DNA with the Mirantis Launchpad deployer for Mirantis Kubernetes Engine. It's configured by editing a declarative YAML file (parts of which supersede the k0s.yaml default configuration file generated and used in manual deployment) in a consistent, simple, and well-documented format, then applying it — causing k0sctl to connect with target hosts (using SSH), download, deploy, and configure K0S components and/or replace them to converge the target cluster on a desired state.
If issues are encountered during installation, k0sctl (like Launchpad) is generally able to function idempotently, saving time by picking up where it left off. k0sctl can also deploy K0S to air-gapped environments, if required binaries are downloaded and assembled in an (uncompressed) OCI bundle. Airgap installation can also be done when K0S is installed manually. As with Launchpad, k0sctl offers several convenience features, including the ability to download a kubeconfig from a deployed cluster, and quickly reset a cluster, clearing its hosts.
On the Roadmap
The next phase of K0S evolution, says Mikko Viitanen, Senior Project Manager, is likely to focus on "Autopilot" functionality: a set of operators and other automation that will enable upgrade-in-place of sufficiently-resourced K0S clusters without interrupting availability of running applications. If you haven't tried K0S, our manual deployment tutorial, Docker container deployment tutorial, and kosctl deployment tutorial will put you in the driver's seat in minutes. K0S is, of course, ideal for Kubernetes learners: it can run on your desktop in a Docker container, on Raspberry Pis or desktop virtual machines, or on larger aggregations of bigger virtual or bare metal infrastructure for ultimate performance and high availability. Full documentation is at k0sproject.io. Try it!