k0s Optimizes Start Time, Adds Cluster Level Backup/Restore and More

Mikko Viitanen
k0s — The Kubernetes Distribution
5 min readJun 21, 2021

--

Image by Jiří Rotrekl from Pixabay

We are proud to announce k0s — the zero friction Kubernetes — version 1.21.2 is now released! The highlights of this release (and the previous 1.21.1 release) are Start Time Optimization, Cluster Level Backup/Restore, and the new Start and Stop commands. In addition, you’ll find a number of other enhancements and fixes. Learn more about the new features and enhancements below or see the full change log. Get started today!

Start Time Optimization

The k0s bootstrap process has been optimized and the start time has decreased significantly. The optimization impacts the controller node’s start time by tens of seconds by fine tuning the k0s internally used client for Kubernetes API and streamlining the process of pushing system component manifests into the API.

After this change, we have measured

  • Single-node start time: ~57 s
  • Single-node air-gap start time: ~50 s
  • 3 controllers and 3 workers using k0sctl: ~79 s

Exact start times depend on the network and hardware, so these start times should be considered indicative only.

Cluster Backup and Restore using k0sctl

The basic part of backup and restore was delivered to k0s already in April. The development continued and now we’ll deliver the cluster level backup and restore using k0sctl, which is a separate tool for multi-node cluster management. k0sctl can be run externally from the cluster (in MacOS or Linux) to deploy and upgrade multi-node clusters. From now on you can also orchestrate the backup and restore.

The k0s backup and restore functions were also enhanced to include SQLite (default for single node clusters) in addition to etcd (default for multi-node clusters). To learn more about k0s backup and restore, see the k0s documentation.

Start and Stop Commands

It’s now made easier to start and stop k0s than before. Earlier users needed to call the Linux init system to start and stop k0s (e.g. systemctl start k0scontroller). Now k0s implements the init system management and users can just call k0s start and k0s stop to control k0s regardless of the actual init system in the background. Currently k0s supports systemd and OpenRC init systems. After this change it’s still possible to control the init systems directly, as before, if for example some less common init system needs to be used. We believe this change makes it easier for most users as they don’t need to remember the long init system commands anymore. The k0s install tutorials have been updated accordingly to simplify the k0s installation.

Documentation restructuring

k0s documentation got an uplift for its structure. In the past we have seen some problems in finding certain content from the documentation and now we have decided to go towards the use-case approach. This is simply to make it easier for our users to find what they are looking for.

We are also adding more content based on the feedback and questions we are receiving. We have recently added new pages for

We see improving documentation as an ongoing effort, so keep your feedback and questions coming. We very much appreciate all the help and contributions to make the k0s documentation extremely good.

Certificate rotation

Starting with this release, k0s is automatically rotating the k0s managed certificates (except the CA certs). The rotation for certificates is always done at the controller node startup to ensure that certificates won’t expire accidentally. Fresh certificates are always being used after upgrades and controller node restarts.

Configurable mode for Kube-Proxy

Kube-Proxy mode has been made configurable. We have seen that in some cases the default mode ‘iptables’ is not optimal. For example, if there is a very large number of services, iptables may become slow and consume too much CPU time. The second example is the limited set of kernel modules. This can be the case for example in resource-constrained IoT devices, where only minimum kernel modules exist. In this case, configuring Kube-Proxy to userspace mode can be useful.

Kube-Proxy can now also be disabled completely. This can be beneficial e.g., when running with a custom CNI provider that can act also as the kube-proxy replacement for the nodes.

‘k0s ctr’ subcommand

k0s ctr is a new subcommand to inspect containers in containerd CRI. It can be used to list, pull and label images

  • k0s ctr images list
  • k0s ctr image pull
  • k0s ctr images label

This can be helpful for example to check the exact images being run or when debugging any container level issues on worker nodes.

‘k0s sysinfo’ subcommand

k0s sysinfo is a new subcommand to display the host OS kernel version, enabled kernel modules and cgroups. This is useful when checking that the host OS meets the minimum requirements and makes sure k0s can get all the Kubernetes components up and running. Since the set of needed kernel modules and configs depends on the cluster level configuration, we decided to implement this as a separate command. This is to avoid a sudden failure on the k0s worker bootstrap itself.

Updated Upstream Components

  • Update Kubernetes to 1.21.2
  • Update Konnectivity to 0.0.20
  • Update etcd to 3.4.16
  • Update containerd to 1.4.6
  • Update runc to 1.0.0-rc95

Community Updates

As a gentle reminder: if you are not yet following us on Twitter, please do it now! Also, please join the k0s Slack channel (hosted by our friends at Lens IDE community) to hear the latest news, discussions and provide your feedback.

About k0s

k0s is zero friction Kubernetes distribution. It provides a unique mix of simplicity, security and modularity. k0s is 100% open source and free of charge, for any purpose. The k0s open source project is backed by a number of Kubernetes, Docker and Linux ecosystem pioneers. It combines experience with all the best innovations and ideas in the ecosystem to create a pure Kubernetes distribution that is slim, modern & fresh while maximizing the developer happiness. https://k0sproject.io

--

--

Mikko Viitanen
k0s — The Kubernetes Distribution

Product Manager, passionate about open source, cloud technologies and Kubernetes.