MicroK8s 1.27 is out!

K. Tsakalozos
ITNEXT
Published in
5 min readApr 12, 2023

--

True to our mission, we bring the latest Kubernetes release 1.27 to your doorstep only a few hours after its upstream release.

To get a gimps of what MicroK8s is all about you need to:

sudo snap install microk8s --classic --channel=1.27
sudo microk8s status --wait-ready

MicroK8s packages all that is needed to setup an efficient K8s cluster. This makes it ideal for your local workstation, edge use cases and small to mid sized clusters. You do not need to install anything else. Try for example kubectl:

sudo microk8s kubectl get all -A

Core workloads come as addons:

sudo microk8s enable dns
sudo microk8s enable dashboard
sudo microk8s enable observability

What kept us busy for the past 4 months?

Obviosly with the latest MicroK8s release comes Kubernetes 1.27. I am not going to reiterate here over what K8s 1.27 brings you; you can read more about those in the upstream release blog post. Also, I would point you to the MicroK8s release notes for a detailed view of all component versions that made it into this K8s distribution. Here, I would like to call out a few features that may not be so obvious on first glance.

cloudinit-like launch configurations

Up until now setting up MicroK8s required a few shell commands to setup and configure. Starting with this release we allow users to provide a yaml manifest describing how MicroK8s should be setup. Manifests may specify things like:

  • which addons to be enabled,
  • what cluster the node should join,
  • what image and addon repositories should be used,
  • what arguments should be used in bringing up the K8s services

MicroK8s consumes configuration manifests found in /root/snap/microk8s/common/ or passed as snap configuration argument via snap set microk8s config=”$(cat microk8s-config.yaml)” as well as through a content interface.

With launch configurations one can interface with snapd to automate the the installation of MicroK8s and shape the deployment according to her needs. Doing this through code without the need to shell out is a topic for a future blog post. Read more about launch confiurations in the official docs.

Datastore — dqlite improvements

The default datastore that comes with MicroK8s is not etcd. Having etcd as the datastore is supported but setting it up requires some manual steps and this does not align well with the zero-ops direction we have given to MicroK8s. Therefore, we are using dqlite by default and take advantage of its advance resilience features. These features include but are not limited to failure domains, transparent leadership election, arbitrary datastore cluster size and transparent role promotions.

In 1.27 we optimized the queries that hit the datastore. This yields a sizable benefits in both latency and CPU utilization. Work on this area is still on-going so expect more improvements in the near future.

Cluster API - upgrades

The work on cluster API continued in this release and we are now in a state where we can completely mange the life-cycle of the cluster. In particular we have finished the work on cluster upgrades taking a unique approach that many will appreciate. The norm in cluster upgrades has been so far the rolling approach: during an upgrade a new upgraded node is brought into the cluster and one old un-upgraded node is removed. This process repeats until all nodes have been replaced and thus the cluster has migrated to the new version. This works great. However, in the case of non-HA clusters where there are not enough datastore nodes to form a quorum as old nodes are removed you need a different upgrade strategy. The latest MicroK8s CAPI provider addresses this case. In non-HA clusters, control plane nodes are upgraded following an in-place strategy. According to this strategy the MicroK8s snap just refreshes to the new version and thus the datastore is left using the same data.

You can read more on the MicroK8s cluster API provider in the official docs.

AWS appliance and EKS-D release

Well… this is not 1.27 related but it kept us busy! The 1.25-eksd release is available from a dedicated track:

sudo snap installmicrok8s --classic --channel=1.25-eksd 

In addition to shipping the EKS k8s distribution the eksd tracks include a set of addons that help with the integration of AWS services, ie storage on AWS and LB. Read more in the official docs.

The AWS fans may also find the MicroK8s appliance on the Marketplace a useful addition to their portfolio.

Many thanks to our contributors

Last but not least a big thank you to the 1.27 contributors:

  • @balchua, for his work on the cert-manager addon that now waits for the operator to be functional after enabling it and for setting the right permissions to the microk8s ctr command.
  • @bitmeal, for his work on improving certificate handling
  • @byjg, for contributing two new addons, EasyHAProx and Parking, allowing for ingress with HAproxy and for parking domain names.
  • @dud22, for his fixes in the refresh-certs command
  • @howto-kubernetes-info, for hist work on upgrading the ingress addon
  • @m4rc3l-h3, for improving the microk8s reset command
  • @saiyan86, @tomqin93, for contributing the shifu addon and establishing a partnership.

A big shout out to the new addons

  • Shifu is a Kubernetes native, production-grade, protocol & vendor agnostic IoT development framework. The partnership with Shifu takes IoT and Edge devices with MicroK8s to the next level.
  • EasyHAProxy automatically configures HA proxy as ingress based on the labels defined in deployed containers. An advantage of HA proxy is that it provides TCP endpoints and it works in tandem with the next addon.
  • Parking deploys a static webserver to park a domain this involves setting up all necessary ingress, service and pods.

Interested in helping with the v1.28 release?

Check out the repo at GitHub — canonical/microk8s: MicroK8s is a small, fast, single-package Kubernetes for developers, IoT and edge. and talk to us on the Kubernetes Slack, in the #microk8s channel.

Links

--

--