MicroK8s is Canonical’s single-package Kubernetes, convenient for small servers, labs and edge sites.
sudo snap install microk8s --classic --channel=1.31/stable
sudo usermod -aG microk8s $USER && newgrp microk8s
microk8s status --wait-ready
microk8s kubectl get nodes
echo "alias kubectl='microk8s kubectl'" >> ~/.bashrc
Enable add-ons as needed:
microk8s enable dns hostpath-storage metrics-server ingress
microk8s enable cert-manager
microk8s enable observability # Prometheus and Grafana stack, needs resources
microk8s enable registry # private registry on localhost:32000
Export a kubeconfig for your workstation: microk8s config > ~/.kube/config.
Notes:
- Updates arrive through the snap channel; use
--channel=1.31/stableto stay on a minor version and refresh deliberately (sudo snap refresh microk8s --channel=1.32/stable). hostpath-storagestores volumes on the node’s disk, so it is not highly available.- Allow 2 vCPUs and 4 GB RAM at the least.