Set up OpenFaaS

OpenFaaS is a functions platform, it stands for "Functions as a Service", but can also deploy microservices.


With function we mean a small and reusable piece of code that:

  • is short-lived
  • is not a daemon (long-running)
  • is not stateful
  • makes use of your existing services or third-party resources
  • usually executes in a few seconds

Open source FaaS frameworks

There is a reach zoology of FaaS frameworks created to provide and to manage functions starting from the one developed by IaaS providers (e.g. AWS Lambda, Google Cloud Functions, Azure functions). There are also many open-source FaaS solutions (as you can see in the figure above) and for this hands-on we will make use of OpenFaaS.

Install OpenFaaS on Kubernetes

sudo kubectl apply -f
# generate a random password
PASSWORD=$(head -c 12 /dev/urandom | shasum| cut -d' ' -f1)

sudo kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \

echo $PASSWORD > gateway-password.txt

git clone
cd faas-netes && \
sudo kubectl apply -f ./yaml

After few minutes you should be able to go to to start browsing the OpenFaas WebUI.

curl -sL | sudo sh
$ faas-cli help
$ faas-cli version


echo -n $PASSWORD | faas-cli login --password-stdin


Other references