Orchestrators of Functions on Kubernetes

Jasbir Singh
Google Cloud - Community
5 min readJun 22, 2023

--

AWS introduced the first Function-as-a-Service (FaaS) runtime, Lambda, in 2014 that enabled developers to evolve beyond Micro services to create Serverless application architectures. At its core a FaaS runtime requires a container engine of some sort that it can insert functions into, so it is no surprise that almost four years after the Lambda announcement that there are now five FaaS runtimes installable on top of Kubernetes (K8S) that have more than 3,000 stars on GitHub.

Google’s Knative(Cloud Run)

The 800-pound gorilla in this space is Google’s Knative. Knative is a platform-agnostic solution for running serverless deployments.

Knative Serving

Knative Serving defines a set of objects as Kubernetes Custom Resource Definitions (CRDs). These resources are used to define and control how your serverless workload behaves on the cluster.

Knative Eventing

Knative Eventing is a collection of APIs that enable you to use an event-driven architecture with your applications. You can use these APIs to create components that route events from event producers to event consumers, known as sinks, that receive events. Sinks can also be configured to respond to HTTP requests by sending a response event.

Knative Eventing uses standard HTTP POST requests to send and receive events between event producers and sinks. These events conform to the CloudEvents specifications, which enables creating, parsing, sending, and receiving events in any programming language.

OpenFaaS — Serverless Functions Made Simple

OpenFaaS® makes it easy for developers to deploy event-driven functions and microservices to Kubernetes without repetitive, boiler-plate coding. Package your code or an existing binary in a Docker image to get a highly scalable endpoint with auto-scaling and metrics.

OpenFaaS uses a templating system that hides the existence of a Dockerfile from the developer. OpenFaaS CLI takes care of build, push to repo, and deployment steps and the base framework includes an API gateway that immediately makes functions callable from tools like curl.

Oracle and the Fn Project

The Fn project is an open-source container-native serverless platform that you can run anywhere — any cloud or on-premise. It’s easy to use, supports every programming language, and is extensible and performant.

With Fn, the Dockerfile is obscured from the developer — the CLI helps manage build, push, and deploy steps, but a power user can simply bring their own Dockerfile and the CLI will build that as the function. What’s exciting about Fn is the emergence of their new FDK, which is slowly rolling out on a variety of languages to help accelerate function development and provide access to HTTP primitive objects to make building REST API’s with Fn far more flexible.

Key features of Fn Project

  • Open Source
  • Native Docker: use any Docker container as your Function
  • Supports all languages
  • Run anywhere
  • Public, private and hybrid cloud
  • Import Lambda functions and run them anywhere
  • Easy to use for developers
  • Easy to manage for operators
  • Written in Go
  • Simple yet powerful extensibility

Platform 9’s Fission

Fission is an open source, Kubernetes-native serverless framework. Fission allows you to code serverless functions in any language, and have them run wherever you have a Kubernetes cluster: in the public cloud, on-premises, on your laptop, or at the Edge. Fission automatically manages the infrastructure for you. You can just focus on your code, and get the most out of Kubernetes infrastructure, without requiring any in-depth knowledge of Kubernetes at scale, no containers to build or registries to manage.

Highlights

  • Portable functions platform — run functions on any cloud or on-premises without fear of lock-in
  • Write functions in any language and package them in Docker/OCI-format containers
  • Easy to use — built-in UI, powerful CLI and one-click installation
  • Scale as you go — handle spikes in traffic, and scale down when idle
  • OpenFaaS Pro for commercial use and production
  • Community Edition — explore functions, or build a PoC without any cost

Bitnami’s Kubeless

Kubeless is an open-source serverless computing framework run on top of Kubernetes. Kubeless allows deploying code without having to worry about infrastructure. Kubeless uses Kubernetes resources to provide auto-scaling, routing, monitoring, and troubleshooting. The requirement is to create and deploy function exposed via three possible types of trigger mechanisms.

  • pubsub triggered
  • HTTP triggered
  • schedule triggered

Kubeless has what might be the most comprehensive set of examples making it easy to learn.

Recently published “Survey on Serverless Technologies” conducted by The New Stack, Kubeless was the most popular choice among FaaS on K8S platforms, showing that it has prominence in this young marketplace. The Kubeless Serverless Framework plugin is very easy to use and provides a wide variety of ingress options, making exposing functions built with it for a REST API a clean development experience.

Apache’s OpenWhisk

Apache OpenWhisk is an open source, distributed Serverless platform that executes functions (fx) in response to events at any scale. OpenWhisk manages the infrastructure, servers and scaling using Docker containers so you can focus on building amazing and efficient applications.

The OpenWhisk platform supports a programming model in which developers write functional logic (called Actions), in any supported programming language, that can be dynamically scheduled and run in response to associated events (via Triggers) from external sources (Feeds) or from HTTP requests. The project includes a REST API-based Command Line Interface (CLI) along with other tooling to support packaging, catalog services and many popular container deployment options.

IBM was the first public cloud vendor to open source their FaaS engine, OpenWhisk, that they then partnered with the Apache Foundation on. Although technically still an Apache incubator project, OpenWhisk is used by IBM in production and has the most contributors of any of the FaaS on K8S runtimes on this list. It puts the most thought into security, with built in access keys, some multi-tenancy, and HTTPS support for the API gateway. They also support a Serverless Framework plug-in and OpenWhisk is the second FaaS runtime on this list that maintains a pool of containers that contain language runtimes, but only get the function code loaded into them upon function invocation.

--

--

Jasbir Singh
Google Cloud - Community

Consulting Cloud Architect, Public Cloud@Rackspace Technology