« Previous 1 2
Zero-Ops Kubernetes with MicroK8s
Small Packages
Ice Cream On Top
When you get a bit more involved with MicroK8s, you can integrate an impressive list of available add-ons, such as those for address resolution and storage services:
$ microk8s enable dns storage
You can find the list of add-ons online [13]. If you're curious, the storage
add-on offers "… a default storage class which allocates storage from a host directory," and dns
installs the excellent CoreDNS. The documentation notes that this may be a mandatory requirement for some applications and that you should always enable it.
If you want to see which commands do what with MicroK8s, visit the Command Reference page [14]. Note you can add multiple nodes to the Kubernetes cluster with the instructions in the microk8s add-node
link.
Among the basic commands, it is simple to stop MicroK8s and start it up again:
$ microk8s stop $ microk8s start
If you want to tidy up your Raspberry Pi after your MicroK8s tests, you can remove the snap package,
$ snap remove microk8s
and you can tidy up the snap files:
$ apt purge snapd squashfs-tools
If you encounter any headaches, you should check the Troubleshooting page [12]. You will find a number of hints and tips and discover where to send bug reports.
The End Is Nigh
As you can see, this little Kubernetes distribution is quite something. It operates on almost no compute capacity and only appears to add roughly 700MB of RAM footprint without any workloads, relative to the 2.9GB noted previously, leaving lots of headroom for application workloads.
As the documentation suggests, with a Raspberry Pi, you might embed a Kubernetes distribution on a racing car to push engine metrics up to the cloud for analysis or integrate it with a satellite chassis for telemetry from Earth's orbit. It's intriguing to follow where this space is going, and I hope this look at MicroK8s has given you a welcome insight.
A zero-ops installation of Kubernetes is well worth learning for the future, to keep abreast of associated innovations.
Infos
- K3s: https://k3s.io
- minikube: https://minikube.sigs.k8s.io/docs/start
- MicroK8s: https://microk8s.io
- Amazon Linux 2 live kernel patching: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/al2-live-patching.html
- Whitepaper: https://ubuntu.com/engage/microk8s-451research
- Alternative Installs: https://microk8s.io/docs/install-alternatives
- snap: https://snapcraft.io
- "Packaging Apps To Run on Any Linux Device" by Chris Binnie, ADMIN , issue 41, 2017: https://www.admin-magazine.com/Articles/Container-Apps
- Snap on Raspberry Pi docs: https://snapcraft.io/docs/installing-snap-on-raspbian
- Selecting a snap channel: https://microk8s.io/docs/setting-snap-channel
- Calico: https://www.projectcalico.org
- MicroK8s troubleshooting: https://microk8s.io/docs/troubleshooting
- MicroK8s add-ons: https://microk8s.io/docs/addons#heading--list
- Command Reference: https://microk8s.io/docs/command-reference
« Previous 1 2
Buy this article as PDF
(incl. VAT)