Building a Kubernetes "Intelligent Edge" Cluster on Raspberry Pi

Author Dave Glover, Microsoft Australia
Platform Raspberry Pi, Raspbian Buster, Kernel 4.19
Date October 2019
Acknowledgments Inspired by Alex Ellis' work with his Raspberry Pi Zero Docker Cluster
Skill Level This guide assumes you have some Raspberry Pi and networking experience.

Building a Raspberry Pi Kubernetes Cluster

Building a Kubernetes Intelligent Edge cluster on Raspberry Pi is a great learning experience, a stepping stone to building robust Intelligent Edge solutions, and an awesome way to impress your friends. Skills you develop on the edge can be used in the cloud with Azure Kubernetes Service.


Learning Kubernetes

You can download a free copy of the Kubernetes: Up and Running, Second Edition book.

It is an excellent introduction to Kubernetes and it will accelerate your understanding of Kubernetes.

Published: 8/22/2019

Improve the agility, reliability, and efficiency of your distributed systems by using Kubernetes. Get the practical Kubernetes deployment skills you need in this O'Reilly e-book. You will learn how to:

Learn how to use tools and APIs to automate scalable distributed systems for online services, machine learning applications, or even a cluster of Raspberry Pi computers.

Azure Kubernetes Services

Azure Kubernetes Services Documentation

Kubernetes Resources

Demo application for "Kubernetes Up and Running (on GitHub)"

Installed Demos

Before run the demos you need to insure an instance of the corresponding demo pod is running. By default, there are zero pod instances active when the cluster is set up. The easiest way to start a pod is from the Kubernetes Dashboard Deployments and Replica Set tabs

You need the application service address and port. Again. most easily obtained from the

Preinstalled Demos

  1. NGINX Web Server: http://{nginx-service EXTERNAL-IP}
  2. Jupyter Notebook (Python3, Pandas, Numpy, Scipy, Tensorflow 2): http://{jupyter EXTERNAL-IP:8888/}
  3. Led Controller: http://{led-controller EXTERNAL-IP}/api/ToggleLed?led=0
  4. Image Classification: curl -X POST http://{image-classifier EXTERNAL-IP}/image -H "Content-Type: application/octet-stream" --data-binary @banana.jpg

Running Demos

Image Classification

while : ; do curl -X POST http://{image-classifier EXTERNAL-IP}/image -H "Content-Type: application/octet-stream" --data-binary @banana.jpg done &

LED Controller

count=0; while : ; do count=$(($count + 1)); curl http://{led-controller EXTERNAL-IP}/api/ToggleLed?led=$(($count % 8)); done &