OpenFaaS is a framework for building serverless functions with Docker and Kubernetes which has first-class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding.
- Ease of use through UI portal and one-click install
- Write functions in any language for Linux or Windows and package in Docker/OCI image format
- Portable - runs on existing hardware or public/private cloud
- Kubernetes and Docker Swarm native
- CLI available with YAML format for templating and defining functions
- Scales as demand increases
You will learn how:
- to install OpenFaaS on Kubernetes
- to interact with OpenFaaS from the command-line and its portal
- functions are deployed and removed
- functions are named, exposed, and invoked
- functions are listed, inspected and monitored
- functions automatically scale up and down based on load
The OpenFaaS architecture is described in the OpenFaaS documentation. More references to documentation and examples listed at the end of this scenario.
OpenFaaS is an independent project created by Alex Ellis that is being built and shaped by a growing community of contributors. Kubernetes provides this serverless framework a resilient and scalable cluster where OpenFaaS can complement other solutions in the same shared data center.
With these steps you have learned:
- ✔ how to install OpenFaaS on Kubernetes,
- ✔ how to interact with OpenFaaS from the command-line and its portal,
- ✔ how functions are deployed and removed,
- ✔ how functions are named, exposed, and invoked,
- ✔ how functions are listed, inspected and monitored,
- ✔ how functions automatically scale up and down based on load.
- OpenFaaS project
- OpenFaaS is open source
- OpenFaaS documentation
- CLI tool
- OpenFaaS Operator Helm chart *
- OpenFaaS Operator Helm chart based on faas-netes Helm chart *
- Helm, a package manager for Kubernetes
- Helm chart for OpenFaaS
- Video: Scaling in action with Prometheus
* Faas-netes chart versus OpenFaaS Operator chart The faas-netes controller is the most tested, stable, and supported version of the OpenFaaS integration with Kubernetes. In contrast, the OpenFaaS Operator (used in this scenario) is based upon the codebase and features from faas-netes, but offers tighter integration with Kubernetes through CustomResourceDefinitions (CRD). This means you can type in
kubectl get functionsto list the CRD that makes this
Your Kubernetes Cluster
For this scenario, Katacoda has just started a fresh Kubernetes cluster for you. Verify it's ready for your use.
kubectl version --short && \
kubectl get componentstatus && \
kubectl get nodes && \
The Helm package manager used for installing applications on Kubernetes is also available.
helm version --short
You can administer your cluster with the
kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard.