Ron Rivera

2 minute read

It is still holiday shutdown over here down under and I was looking for a project to work with that’s specifically targeted for my rpi-k8s cluster.

Serverless frameworks like AWS Lambda and kubeless are already in my radar for quite some time now but never really bothered tinkering on them. I guess I didn’t see any valid use case for me to utilise them at that time.

Then I’ve read Alex Ellis’ post about Serverless Kubernetes home-lab with your Raspberry Pis. It provides a detailed walkthrough on deploying OpenFaaS, an open source framework to make building and deploying serverless functions simple. It leverages Docker containers as the unit of deployment which makes the barrier to entry very minimal.

It is the perfect project to turn my rpi-k8s cluster into something more interesting and useful so with lots of free time in my hands, I set off and followed the instructions from his excellent post. Before I knew it, I already have a Serverless cluster running on my Raspberry Pi.

Here it is in action:

I was so pleased with how easy it was for me to have my own Functions-as-a-Service infrastructure with the RPi so I continued exploring. One of the value proposition that OpenFaaS offers is the ability to turn any CLI into a serverless function which is demonstrated in this yet another great post from Alex.

This served as an inspiration for me to search for a CLI utility to turn into a serverless function. Sydney is having a wild weather pattern since the onset of summer this year so I thought converting the wego weather client for the terminal would be perfect.

Here’s a screenshot of the weather client function invocation output with the OpenFaaS UI in the background:

If you wanted to see how I converted this, head over to my openfaas-asciiweather repo for the complete details.

comments powered by Disqus