Difficulty: Introduction
Estimated Time: 20 minutes

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.

Key Features

  • 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.

Lessons Learned

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.


* 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 functions to list the CRD that makes this Kind: function possible.

For a deeper understanding of these topics and more join
Jonathan Johnson
at various conferences, symposiums, workshops, and meetups.

Software Architectures ★ Speaker ★ Workshop Hosting ★ Kubernetes & Java Specialist


Step 1 of 10

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 && \ kubectl cluster-info

The Helm package manager used for installing applications on Kubernetes is also available.

helm version --short

Kubernetes Dashboard

You can administer your cluster with the kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard.


Kubernetes Dashboard
OpenFaaS Portal