3 tiny Kubernetes distributions for compact container management

“Small is beautiful,” as E. F. Schumacher once said. Kubernetes, a powerful but sprawling container orchestration platform, might benefit from a more stripped-down approach. Not everyone needs the full set of tools and features found in the default Kubernetes distribution.

You may not have the time or technical know-how to customize Kubernetes for more minimalist applications, but there’s a good chance someone else has done it for you. This article looks at three Kubernetes distributions that take Kubernetes back to the basics.

Minikube

Minikube, an official repackaging of Kubernetes, provides a local instance of Kubernetes small enough to install on a developer’s notebook. The minimum requirements are 2GB of free memory, 2 CPUs, 20GB of storage, and a container or virtual machine (VM) manager such as Docker, Hyper-V, or Parallels. Note that for Mac users there is as yet no M1 build, only x86-64.

You can set up and deploy a simple Minikube cluster in just two steps: install the Minikube runtime and type minikube start at the command line. Everything after that is standard Kubernetes as you’ve come to know it. You’ll use kubectl to interact with the cluster.

Also included with Minikube is the web-based Kubernetes Dashboard, which you can use for at-a-glance monitoring of your cluster. Sample applications can be spun up with a couple of commands, and you can even deploy with load balancing.

A common use for Minikube is to replace Docker Desktop. Note that doing that requires a) using the docker container runtime and b) running Minikube itself with a VM driver instead of a container runtime.

k3s

k3s, a Cloud Native Computing Foundation project, is “lightweight Kubernetes.” It is best suited to running Kubernetes in resource-constrained environments. Even a Raspberry Pi will work as a k3s device, as k3s comes in ARM64 and ARMv7 builds. Note that it does not work on Microsoft Windows or macOS, only on modern Linux such as Red Hat Enterprise Linux or Raspberry Pi OS.

k3s requires no more than 512MB to 1GB RAM, 1 CPU, and at least 4GB of disk space for its cluster database. By default k3s uses SQLite for its internal database, although you can swap that for etcd, the conventional Kubernetes default, or for MySQL or Postgres.

The core k3s runtime is a single binary, with very little tinkering needed to get up and running with a sensible set of defaults. The basic setup process takes no more than a single shell command to download and install k3s as a service. You can also run k3s as-is and in-place, without installation.

k3s’s compact, no-frills approach means you have to add many features by hand or through command-line recipes. The documentation gives directions for how to add the Kubernetes Dashboard, swap in Docker as the default container runtime, run k3s in “air-gapped” mode, and perform many other useful modifications.

k0s

k0s, from Mirantis, also comes distributed in a single binary for convenient deployment. Its resource demands are minimal—1 CPU and 1GB RAM for a single node—and it can run as a single node, a cluster, an air-gapped configuration, or inside Docker.

If you want to get started quickly, you can grab the k0s binary and set it up as a service. Or you can use a dedicated installation tool, k0sctl, to set up or upgrade multiple nodes in a cluster. It is possible to run k0s under Microsoft Windows, but it’s currently considered experimental. One unexpectedly powerful feature, included by default, is auto-updating. You can use this feature to define a plan for updating the cluster on a schedule, with safeties in place to avoid a broken upgrade.

k0s’s documentation provides recipes for various customizations. If you want to run your cluster in air-gapped mode, for instance, there’s instructions for setting up, running, and updating a cluster with limited internet access. Another useful documentation recipe details how to set up the control plane for high availability. And while some components aren’t included by default, like load balancing and Ingress controllers, the documentation walks through how to add those components manually.

Copyright © 2022 IDG Communications, Inc.

Source