How to build a Raspberry Pi Kubernetes Cluster with k3s

and running some cool IoT applications on it

Alex Ortner
Thinkport Technology Blog

--

This blog article is the result of a fun Kubernetes Meetup we had in Mai 2022 in Leipzig, Germany with a practice lab playing around with k3s and some Raspberry Pi to building some example applications.

I thought it might be also interesting for others to have a hands-on tutorial on how to setup a Kubernetes clusters with a couple of Raspberry Pi using k3s and how to use a Kubernetes Pod to run a typical Raspberry Pi app, like some home automation or IoT apps.

The difference to many other tutorials around Kubernetes on Raspberry Pi is that this one does not stop after the cluster setup but also shows several example applications that can be deployed. Like a monitoring app that runs on all devices or an LED strip app that runs only on a dedicated node and has accesses to the GPIO Pins directly from the Pod.

Content

  1. Setup Raspberry Pi headless
  2. Setup k3s cluster
  3. Configure kubectl on client
  4. Use case 0: functional test
  5. Use case 1: deploy a MQTT broker using Helm
  6. Use case 2: monitoring app on each Raspberry Pi

--

--

Alex Ortner
Thinkport Technology Blog

Physicist, Data Scientist, agile enthusiast, father, musician who loves to play Dixieland, woodworker building children’s toys