Serverless workloads and eventing on Kubernetes
open sourceApache-2.0self-hostablefree
Knative is a CNCF graduated project that runs serverless workloads on Kubernetes. Knative Serving deploys a container as a Service without separately configuring deployments, services, ingress and autoscaling: it scales with requests, down to zero when idle, keeps an immutable revision for each change and routes traffic between revisions by percentage or named routes for gradual rollouts. Knative Eventing is a set of APIs for event-driven applications: sources publish CloudEvents over HTTP to brokers, and triggers route them to sinks, so consumers can be added and routing changed without touching producers. Knative Functions creates, builds and deploys stateless functions from templates with the func CLI (or the kn func plugin), building the container image for you. Everything is defined as Kubernetes custom resources and managed with the kn CLI. It's Apache-2.0 licensed.
Problems it solves
- run serverless containers on my own Kubernetes cluster
- scale a Kubernetes service to zero when it has no traffic
- self-hosted alternative to Google Cloud Run or AWS Lambda
- route events between producers and consumers on Kubernetes
- deploy functions to Kubernetes without writing Dockerfiles
- canary or blue-green traffic splitting between revisions
Features
- Serving: deploy a container as a Service with routes, configurations and revisions managed for you
- Request-based autoscaling, including scale to zero
- Immutable revisions with fractional and named traffic routing
- Eventing: brokers, triggers, sources and sinks for CloudEvents over HTTP
- Functions: templates and the func CLI build and deploy functions without Dockerfiles
- kn CLI
- Kubernetes custom resources for every object
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Takes plugins | plan not known |
Alternatives
The same job
These do what Knative does.
- Fission Serverless functions framework for Kubernetes
- OpenFaaS Serverless functions on any Kubernetes cluster
- Google Cloud Run Build apps or websites quickly on a fully managed platform
- Azure Container Apps Microsoft Azure's serverless platform for running containers, scaling them on traffic and events
