This tutorial will be a brief walk through the process of getting MicroK8s up and running on Raspberry Pi, and joining multiple Pis to form a production-grade Kubernetes cluster.
MicroK8s is a lightweight, fast, enterprise-grade Kubernetes. Whether you’re new to K8s or a power user, MicroK8s will help you save time and space on any embedded device or IoT projects.
This setup can be fully headless or using an HDMI screen and USB keyboard to control nodes of your cluster.
What you’ll learn
- Deploying Kubernetes on Raspberry Pi using MicroK8s
- Joining multiple deployments to form a cluster
- Managing the cluster: adding and removing nodes
What you’ll need
- A 16.04 LTS (or later) Ubuntu desktop
- A minimum of 2 Raspberry Pis, they need to be Pi 3B or later. (You can use as many as you like, here we use 3)
- A micro-USB power cable for each Pi (USB-C for Pi4)
- A USB power-supply with as many ports as you have boards
- A microSD card per Pi (8GB recommended), flashed with an Ubuntu Server image
- Some basic command-line knowledge
Optional:
- A monitor with an HDMI interface
- An HDMI cable if you’re using Pis 2 or 3 or a MicroHDMI cable for the Pi 4
- A Cat5/6 network cable for each board is preferred, but Wi-FI setup is possible as well
- A USB keyboard
- A cluster rack (Here we are using the Cluster Case from the PiHut)
You will also need to have all of the boards on the same network, with a terminal window ready to connect to each Pi through SSH.