In the Kasperry PI project, we deployed a Kubernetes cluster consisting of 4 Raspberry PI in a home environment.
These 4 nodes could represent Cloudy nodes, and once Kubernetes is set up, services can be managed over the Kubernetes Master. There are also different dashboards for Kubernetes available to help in the management of the services.
The benefits of using a Kubernetes cluster for services shared over Cloudy with a community are a higher resilience of the offered services. The Kubernetes Master (which can also be used in Multi-Master mode to avoid a single point of failure in the Master) takes care that all services are up, and if any node in the home cluster goes down, Kubernetes will arrange that the failing service will be offered by another node of the cluster.
For the home cluster, 4 Raspberry Pi were used, all were the model 4:
– Master node: Raspberry PI 4 with 4Gb and booting with an external SSD
– Infra nodes: Raspberry PI 4 with 4Gb and botting with an external SSD
– Two worker nodes: Raspberry PI 4. (we used nodes with 4GB but they can have less)
The architecture is shown in the following picture:
SSD Disk: From our experience, it is recommended to use an SSD Disk on the master node and Infra node because they have a database running. If a database or persistent storage is not needed, then the Infra nodes can be omitted.
Infra node: It is common to have running infrastructure-related apps, e.g. a database which is making use of non-ephemeral storage, apps which require to mount the container network to the host like a load balancer or an NFS server for sharing files with other nodes, etc.
Operating System: We installed Ubuntu on the Raspberry Pi and we did not use the default Raspian OS or the new Raspberry OS. One of the reasons is that Ubuntu is a more optimized OS for running server applications. In addition, the Ubuntu community is more active about Kubernetes and it has more information. So, we decided to give Ubuntu a try for this deployment.
The cluster of the Raspberry Pi can be seen in the following picture, along with some additional devices we used for other purposes.
Performance: The system has been running stable at 13% of CPU capacity most of the time. The cluster has been tested deploying multiple Pods, which contain Docker containers. The following figure is obtained from DataDog dashboard and shows the number of pods running in our home cluster for several days.
Special thanks for this work to the Kaspberry PI project, Kasperry PI @ Albert Sabate.
The code is available at
For building the cluster, please refer to the tutorials at https://kasperry.io/