Knative Technical Overview¶
This page explains how Knative's components work under the hood and integrate with Kubernetes. For a high-level summary and hands-on tutorials, start at Get started with Knative.
Architecture Overview¶
Knative consists of three main components that work together to provide a complete serverless platform:
- Knative Serving: An HTTP-triggered autoscaling container runtime that manages the complete lifecycle of stateless HTTP services, including deployment, routing, and automatic scaling.
- Knative Eventing: A CloudEvents-over-HTTP asynchronous routing layer that provides infrastructure for consuming and producing events, enabling loose coupling between event producers and consumers.
- Knative Functions: A developer-focused function framework that leverages Serving and Eventing components to provide a simplified experience for building and deploying stateless functions.
These components can be used independently or together, allowing you to adopt Knative incrementally based on your needs.
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.

The primary Knative Serving resources are Services, Routes, Configurations, and Revisions:
-
Services: The
service.serving.knative.devresource automatically manages the whole lifecycle of your workload. It controls the creation of other objects to ensure that your app has a route, a configuration, and a new revision for each update of the service. Service can be defined to always route traffic to the latest revision or to a pinned revision. -
Routes: The
route.serving.knative.devresource maps a network endpoint to one or more revisions. You can manage the traffic in several ways, including fractional traffic and named routes. -
Configurations: The
configuration.serving.knative.devresource maintains the desired state for your deployment. It provides a clean separation between code and configuration and follows the Twelve-Factor App methodology. Modifying a configuration creates a new revision. -
Revisions: The
revision.serving.knative.devresource is a point-in-time snapshot of the code and configuration for each modification made to the workload. Revisions are immutable objects and can be retained for as long as useful. Knative Serving Revisions can be automatically scaled up and down according to incoming traffic.
For more information on the resources and their interactions, see the Resource Types Overview in the serving Github repository.
Request Flow in Serving¶

When a request is made to a Knative Service:
- Ingress Layer: The request enters through the configured networking layer (Kourier, Istio, or Contour).
- Routing Decision: Based on current traffic patterns and scaling state, requests are routed either to the Activator or directly to application pods.
- Scaling: If no pods are running (scale-to-zero), the Activator queues the request and signals the Autoscaler to create pods.
- Queue-Proxy: All requests pass through the Queue-Proxy sidecar, which enforces concurrency limits and collects metrics.
- Application: The request reaches your application container.
For more detail, see the request flow documentation.
GPU Resources and LLM Inference¶
Because Knative Services run as Kubernetes pods, they can request GPU resources through standard Kubernetes resource specifications while keeping scale-to-zero and traffic splitting. For production LLM serving, consider KServe, which builds on Knative Serving to add standardized inference protocols, multi-framework runtimes, and request batching.
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 (known as sources) to event consumers (known as sinks) that receive events. Sinks can also be configured to respond to HTTP requests by sending a response event.
architecture-beta
group eventing[Eventing]
group sources[Event Sources]
service source(cloud)[Event Source] in sources
service broker(database)[Broker] in eventing
service trigger(server)[Trigger] in eventing
service sink(internet)[Event Target]
source{group}:T --> B:broker
broker:R -- L:trigger
trigger:B --> T:sink
Knative Eventing is a standalone platform that provides support for various types of workloads, including standard Kubernetes Services and Knative Serving Services.
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.
Knative Eventing components are loosely coupled, and can be developed and deployed independently of each other. Any producer can generate events before there are active event consumers that are listening for those events. Any event consumer can express interest in a class of events before there are producers that are creating those events.
Key Eventing Concepts¶
- Event Sources: Generate CloudEvents from external systems (databases, message queues, cloud services) and send them into the event mesh.
- Brokers: Receive events from sources and forward them to matching consumers based on CloudEvent attributes.
- Triggers: Filter events on a Broker by CloudEvent attributes and route matches to a subscriber.
- Sinks: Consumers that receive and process events — Knative Services, Kubernetes Services, or external HTTP endpoints.
- Channels: Lower-level primitives for point-to-point event delivery between producers and consumers.
Event Flow in Eventing¶

- Event Generation: An event source detects a change or condition and creates a CloudEvent.
- Event Ingestion: The event is sent to a Broker via HTTP POST.
- Event Routing: The Broker evaluates Triggers to determine which consumers should receive the event.
- Event Delivery: The event is delivered to matching consumers as HTTP requests.
- Event Processing: Consumers process the event and optionally produce response events.
Knative Functions¶
Knative Functions provides a simple programming model for using functions on Knative, without requiring in-depth knowledge of Knative, Kubernetes, containers, or dockerfiles.
Knative Functions enables you to easily create, build, and deploy stateless, event-driven functions as Knative Services by using the func CLI.
Functions can be packaged as Open Container Initiative (OCI) images without writing a Dockerfile. A local container build does not publish an image to a registry. Deployment builds and pushes an image so the cluster can pull it. Supported host builders can also run functions locally without a container.
You can create functions and manage function workflows by using the func CLI, or by using the kn func plugin for the Knative CLI.
Functions Development Model¶
- Standard signatures: Functions use standard HTTP and CloudEvents interfaces to avoid lock-in.
- Built-in templates: Language packs provide templates for Node.js, TypeScript, Python, Go, and Java (Spring Boot and Quarkus), and you can author custom language packs.
- Local development: Build, run, and test locally with
funcbefore deploying. - Automatic containerization:
funcbuilds OCI images without requiring a Dockerfile, and deploys them as Knative Services (or any container runtime).
Function Deployment and Lifecycle¶
flowchart TD
init>"`<code>func init</code>
to create a function`"]
git@{ shape: lin-cyl, label: "fa:fa-git-alt local repo" }
laptop@{ shape: win-pane, label: "Local Development fa:fa-docker" }
oci@{ shape: procs, label: "Container Registry" }
cluster@{ label: "fa:fa-dharmachakra Knative Serving" }
init --> git
git -- develop and test locally--> laptop
laptop --> git
git -- "`<code>func push</code>
push container to registry`" --> oci -.-> cluster
git -- deploy container and triggers --> cluster
Integration with Kubernetes¶
While each component can be used independently, they compose cleanly: Functions deploy as Knative Services, Functions and Serving Services can act as event sources or sinks, and all resources follow Kubernetes-native patterns.
- Policy and IAM: Serving and Eventing are Kubernetes CRDs, so standard RBAC, policies, and service accounts apply.
- Networking: Integrates with cert-manager, Gateway API, Istio, Kourier, and Contour.
- Observability: Uses OpenTelemetry to integrate with Prometheus, Grafana, Jaeger, and other backends.
- CI/CD: Compatible with GitOps workflows, Tekton Pipelines, and other continuous delivery tools.