GET THE LOWDOWN ON MICROK8S
K8ssandra guru Patrick McFadin helped put us right a couple of years ago, describing K8s more as a language for virtualising your own data centre. This is an important distinction, but not one most home users (or anyone that’s never dabbled with distributed computing) will appreciate. This is why we wanted to talk about Canonical’s Microk8s project. Being simple publishers, we started by asking Alex what exactly this is: “MicroK8s is a distillation of the upstream Kubernetes project into a bite-size executable that’s delivered by Canonical as a snap. Its goal is two-fold: to provide an auto-updated, slim Kubernetes; and to make it batteriesincluded ( zero-ops).
“When you first play with MicroK8s you’ll see that on any Ubuntu system it’s a one-line install and you can almost think of it as running like a system service; access to a cluster on tap. The zero-ops component comes in when you want to scale that out to multiple machines and build a production-grade cluster. We do the heavy lifting in ensuring resilience is there, and that certificate regeneration and node network meshing all works. On top of that there’s an add-ons capability with MicroK8s that lets you one-line install from our ecosystem of both firstparty and community add-ons. This could be a load balancer, distributed block storage or even observability; one-click installs that are all tailored to just work.”
So if we have Kubernetes running on, say, a Raspberry Pi, what can it do? We suppose home users have increasing numbers of IoT things, so connecting/ unifying all of those would be good. Also, besides IoT what sort of services can a home install of MicroK8s provide?
“There are a few features that make MicroK8s perfect for edge and IoT infrastructure,” say Alex. “First, MicroK8s goes hand in hand with Ubuntu Core. As you might have seen Core 22.04 has been released which is an immutable OS, optimised for factories, Raspberry Pis and any other number of edge devices. This means that the MicroK8s snap can run under strict confinement – effectively operating in a sandbox environment on an immutable OS.
“In addition to this, we support half a dozen architectures with work being done to support Power9 right now. We’re conscious that many businesses want to use Kubernetes, but have significant investments in datacentres with architecture that might not be the typical amd64. Lastly, a common issue with edge/IoT devices is that managing changes needs to be done periodically and automatically. With MicroK8s and snaps, we can push CVE fixes to a channel and let the device do the rest. It’s even possible to switch Kubernetes versions easily. This doubles down on the idea that MicroK8s is a service that’s always up and smart enough to heal and scale when needed.”
A number of tools have been preconfigured for MicroK8s: Prometheus
which we’ve heard of (because we like graphs), and Jaeger, Istio, LinkerD and KNative, which we haven’t. We tried to make a Helm joke earlier, but must confess we don’t quite know what that is. Can you explain please, Alex? Also, is Helm
fully supported in MicroK8s?
Unphased by our attempts at humour, Alex tells it exactly like it is: “MicroK8s add-ons are easy ways to have popular Kubernetes projects installed into your cluster that come preconfigured with some smart defaults. What’s compelling about this is that we allow users to write these add-ons in a few different ways. It might be a shell script that points at a file, it might be a Python or Golang program. The choice is up to the developer who’s wanting to integrate their application.
“In the same vein, Helm is a yaml configuration templating tool. It lets folks take some files and interpolate them together. The final part is that it tracks the installation of these files into a Kubernetes cluster and lets you uninstall them later on. These are called Helm Charts.”