Introduction
MicroK8s is a lightweight, CNCF-conformant Kubernetes distribution from Canonical that installs with a single command. It targets developers, edge deployments, and CI pipelines where a full kubeadm cluster would be overkill but K3s-style forks sacrifice too much upstream compatibility.
What MicroK8s Does
- Installs a full Kubernetes cluster on a single node in under 60 seconds via Snap
- Bundles curated add-ons (DNS, storage, ingress, GPU, Istio, Knative) that enable with one command
- Forms high-availability multi-node clusters by joining nodes with a token
- Provides automatic OTA updates through Snap channels aligned to Kubernetes release tracks
- Runs on Linux, macOS (via Multipass VM), and Windows (via Multipass or WSL2)
Architecture Overview
MicroK8s packages upstream Kubernetes binaries (kube-apiserver, kubelet, kube-proxy) inside a Snap package with strict confinement. Containerd serves as the container runtime. Dqlite, a distributed SQLite implementation, replaces etcd as the default datastore, reducing memory overhead for small clusters. Each add-on is a shell script that applies upstream manifests, keeping the cluster composition transparent and auditable.
Self-Hosting & Configuration
- Install from Snap on Ubuntu, Fedora, or any Linux distro that supports snapd
- Use
microk8s enable <addon>to activate components like MetalLB, Prometheus, or cert-manager - Join additional nodes with
microk8s add-nodeto form a multi-node HA cluster using Dqlite consensus - Access the cluster with the bundled
microk8s kubectlor export a kubeconfig for external kubectl usage - Pin to a specific Kubernetes minor version by tracking the corresponding Snap channel (e.g., 1.30/stable)
Key Features
- Strict Snap confinement isolates MicroK8s from the host, reducing the blast radius of misconfigurations
- GPU add-on auto-configures NVIDIA drivers and the device plugin for ML workloads
- Built-in container registry add-on provides a local registry at localhost:32000 for fast image iteration
- Automatic certificate rotation and updates keep the cluster secure without manual intervention
- Minimal resource footprint makes MicroK8s viable on Raspberry Pi and IoT edge devices
Comparison with Similar Tools
- K3s — Rancher's lightweight distro that replaces etcd with SQLite; MicroK8s uses Dqlite for HA and ships closer to upstream K8s binaries
- minikube — optimized for local development with VM drivers; MicroK8s runs natively on Linux and better suits production edge use
- kind — runs K8s in Docker containers for CI testing; MicroK8s provides a persistent cluster with add-on management
- kubeadm — the official cluster bootstrapper; MicroK8s wraps kubeadm-equivalent setup into a single Snap install
- Docker Desktop Kubernetes — convenient on macOS/Windows; MicroK8s offers more add-ons and supports multi-node HA clusters
FAQ
Q: Is MicroK8s production-ready? A: Yes. MicroK8s is CNCF-conformant and Canonical offers commercial support. It is used in production for edge, IoT, and small-cluster workloads.
Q: How does the HA mode work? A: Three or more nodes running MicroK8s can form an HA cluster. Dqlite replicates the datastore across nodes with Raft consensus, eliminating the need for an external etcd cluster.
Q: Can I use standard kubectl with MicroK8s?
A: Yes. Run microk8s config > ~/.kube/config to export the kubeconfig, then use any standard kubectl binary.
Q: What happens during a Snap refresh? A: MicroK8s updates are applied automatically through Snap channels. You can control the refresh window or pin to a specific revision to prevent unplanned upgrades.