Notes from episode 14 of TGIK: Serverless with OpenFaaS
Over the past few months I’ve been trying to learn everything there is to know about Kubernetes. Kubernetes is an amazing technology for deploying and scaling containers though it comes with a cost. It’s an incredibly complex piece of software and there are a ton of bells and whistles to become familiar with. One way that I’ve found for coming up to speed is Joe Beda’s weekly TGIK live broadcast. This occurs each Friday at 4PM EST and is CHOCK full of fantastic information. In episode fourteen Joe discusses running serverless applications with OpenFAAS. You can watch it here:
Here are some of my takeways from the episode:
Brigade is a Microsoft project to provide event driver scripting for Kubernetes. Uses Javascript to express your workflows.
Draft can be used to build and deploy applications to Kubernetes. This is still in beta and allows developers to test their code in Kubernetes before they commit to version control.
Brad Geesaman has a great talk on Hacking and Hardening Kubernetes Clusters By Example.
OpenFAAS integrates with Kubernetes but can also be used outside of it.
Contains both a synchronous and asynchronous execution stack. Provides this through two endpoints.
Helm is the preferred way to install OpenFAAS.
Namespaces aren’t defined if you attempt to install OpenFAAS by hand.
Uses NodePorts by default to minimize exposure.
Installs prometheus for monitoring. This also consumes a nodeport.
OpenFAAS manual deployments need 3 files which are provided by faas-netes:
faas
monitoring
rbac
Interact with FAAS through the fas-cli command line utility or through the API.
Kubectl port-forward only works with pods. It doesn’t work with services and node ports.
API Gateway and UI are hosted on the same NodePort.
OpenFAAS creates a docker image to run your serverless code.
Some cloud providers allow you to add annotations to restrict access to services.
Providers provide access to the underlying compute platform. Functions contain the code you want to run.
The faas-cli update flag can be used to perform rolling updates vs. deleting and re-creating.
If GitHub stars mean anything to you this is a super popular choice (over 9k stars to date).
The borglet at Google was run in a container and given additional priority to ensure that other workloads couldn’t impact it.
OpenFAAS supports function chaining which is crazy useful.
Uses deployments and services for data.
Pushes a docker image that contains your code. The fass-cli build option is used to create these containers.
A docker native approach to serverless. Build and push images.