Building your own serverless functions with k3s and OpenFaaS on Raspberry Pi

Click for: original source

In recent years, lots of new programming paradigms have emerged – going from monolithic architectures towards microservices and now serverless functions. As a result, less code needs to be deployed, and updating an application becomes easier and faster as only a part has to be built and deployed. By Andreas Muttscheller.

If you want to stay independent of cloud providers, an open-source solution that can be deployed on your own infrastructure can be beneficial. Cut to OpenFaaS, an open source serverless framework that runs on Kubernetes or Docker Swarm.

In this blog post, we will focus on setting up a Raspberry Pi cluster, using Ansible for reproducible provisioning, k3s as a lightweight Kubernetes distribution, and OpenFaaS to run serverless functions.

The article then describes:

  • Building the Raspberry Pi cluster (4x Raspberry Pi 3)
  • Provisioning the cluster with Ansible
  • Master node and network setup
  • Bootstrap
  • LCD display monitoring

All the code is provided with some solid explanation. Loads of links to further reading, including to printable rack for cluster. Nice one!

[Read More]

Tags serverless containers data-science kubernetes devops docker