How OpenFaaS Works with Kubernetes

Updated

OpenFaaS runs on any Kubernetes cluster and turns your code into serverless functions packaged as portable OCI images. You deploy it to a cluster you already control — on-premises or in the cloud — and get a unified experience for shipping functions, scaling them with demand, and scaling to zero when idle. It fits teams that already run Kubernetes and want a FaaS layer without rebuilding autoscaling, queuing, retries, and event triggers from scratch.

What OpenFaaS adds on top of Kubernetes

Kubernetes gives you the building blocks, but wiring up auto-scaling, queuing, retries, and event triggers yourself takes months of work. OpenFaaS packages that into a usable layer:

  • Deploy anywhere — run functions on-premises or in the cloud using portable OCI images, so the same artifact moves between environments.
  • Any code — write functions in any language, and bring existing microservices along too.
  • Any scale — scale functions to meet demand and down to zero when idle to save on costs.
  • Templates that just work — get code into production within minutes using provided templates, or create your own.

The result is one unified experience: deploy OpenFaaS to any Kubernetes cluster, write a function, and ship it to production in minutes knowing it will scale.

How a function gets to production

  1. Pick or build a template. Templates handle the packaging so you focus on code. Use a provided template for your language, or create your own.
  2. Write the function. Any language is supported, and existing microservices can be brought along rather than rewritten.
  3. Build and deploy. The function is packaged as an OCI image and deployed to your Kubernetes cluster.
  4. Scale it. Functions can be fine-tuned to match the type of traffic they receive, including scaling to zero.

The expected outcome: code that runs on the same cluster you already operate, with scaling behavior you configure rather than build.

Where the Pro tier changes the picture

The core OpenFaaS experience is described as stable, portable, and built for production. OpenFaaS Pro adds capabilities that matter once you move past a basic deployment:

  • Autoscaling
  • Event connectors
  • Monitoring dashboards
  • SSO and RBAC
  • Direct-to-engineering support

If you need single sign-on, role-based access control, or dashboards out of the box, that is a Pro consideration rather than a core one. Pricing and trial details live on the OpenFaaS pricing page — check there for current terms rather than assuming what is included.

Event-driven workloads

Functions can be invoked through events rather than only HTTP calls. Supported event sources include:

  • Apache Kafka
  • AWS SQS/SNS
  • GCP Pub/Sub
  • RabbitMQ
  • PostgreSQL
  • Cron
  • MQTT

This matters for pipelines where work arrives asynchronously — for example, a batch job or ML model that runs as a function with built-in retries, whether it takes milliseconds or hours.

How teams actually use it

A sandbox for customer code. If you want customers to extend your product with custom code, running untrusted code safely is hard to get right. With OpenFaaS, code snippets become isolated functions built and deployed through a REST API, with each tenant in its own namespace and security boundaries enforced at every layer. This pattern is used in production by Waylay (IoT), LivePerson, Cognite (ML/data-science), and RudderStack.

ETL and data pipelines. When processing large volumes of data, managing infrastructure for parallel execution, retries, and scaling is a project in itself. OpenFaaS fans out to thousands of parallel function executions that scale automatically, with batch jobs and ML models running as functions with built-in retries.

Is it a fit for your cluster?

OpenFaaS is a reasonable choice if:

  • You already run Kubernetes and want a FaaS capability without building the surrounding machinery.
  • You need portability across on-premises and cloud via OCI images.
  • You want functions that scale to zero to control cost.
  • You need event-driven invocation from Kafka, queues, databases, cron, or MQTT.

Look at OpenFaaS Pro if you need SSO, RBAC, dashboards, or vendor engineering support as part of the deployment.