Installing Knative¶
This page provides guidance for Kubernetes administrators on how to install Knative on an existing Kubernetes cluster. Knative has three components: Eventing, Serving, and Functions. Serving and Eventing are installed into clusters. Functions is not installed into clusters given that the client func CLI tool builds and deploys stateless functions as standard containers.
A Knative installation assumes you are familiar with the following:
- Kubernetes and Kubernetes administration.
- The
kubectlCLI tool. You can use existing Kubernetes management tools (policy, quota, etc) to manage Knative workloads. - Using
cluster-adminpermissions or equivalent to install software and manage resources in all clusters in the namespace. For information about permissions, see Using RBAC Authorization. - Familiarity is recommended with Cloud Native Computing Foundation (CNCF) projects such as Prometheus, Istio, and Strimzi, many of which can be used alongside Knative.
You can install the Serving and Eventing components independently of one another. You can also add and remove plugins at any time, as well as optional integration tools that span observability, security, and testing. Plugins are described in the Extensibility section.
Installation roadmap¶
Use the following table to determine your installation method. If you just want to get an understanding of Knative functionality at this time, install the quickstart.
| Quickstart | YAML-based | Knative Operator | |
|---|---|---|---|
| Purpose | local | production | production |
| Kubernetes deployment | local, either kind or Minikube |
existing | existing |
| Hardware | 3 CPU, 3 GB RAM | One node: 6 CPUs, 6 GB memory, 30 GB disk storage. Multiple nodes: 2 CPUs each, 4 GB memory, 20 GB disk storage. |
same as YAML-based |
Supported platforms are Linux, MacOS, and Windows.
The Knative Operator is a custom controller that extends the Kubernetes API to install Knative components. For more information about YAML-based and installations with the Knative Operator, see YAML and Knative Operator installations compared.
Use the following steps to install Knative depending on your installation method:
Quickstart:
- Install the CLI Tools.
- Install the Knative Quickstart plugin.
YAML-based:
Install using all YAML files. This option is the most useful if you're using GitOps tools such as Flux or ArgoCD to apply manifests checked into a Git repository. This is the lowest common denominator approach, giving you granular control of the process and resource definitions.
- Install the CLI Tools.
- Install either or both components:
- Install Knative Serving.
- Install Knative Eventing.
Knative Operator:
Install using the Knative Operator as using manifests or Helm, or install using the Knative Operator that is installed with the Knative Operator CLI plugin.
- Install the CLI Tools including the Knative Operator CLI plugin.
- Install the Serving and Eventing components, by either of the following:
- The Knative Operator using Kubernetes manifests or by using Helm.
- The Knative Operator CLI.
All installations require a supported Kubernetes version. System requirements provided are recommendations only. The requirements for your installation may vary depending on which plugin components you use.
For a list of commercial Knative products, see Knative offerings.
YAML and Knative Operator installations compared¶
You install Knative using YAML files and other resources either aided or not by the Knative Operator. The Knative Operator allows you to automate applying, patching, and customizing the content.
The Knative Operator alleviates installation complexities and is compatible with a GitOps approach. It also gives you a separation of the core Knative application definition and the ConfigMap and other changes you make. You install the Knative Operator either by using the Knative CLI Operator Plugin or by using Kubernetes Manifests or by Helm.
Here are the considerations for installing using YAML or the Knative Operator:
| YAML-based install | Knative Operator install |
|---|---|
| You can see exactly what you get. | You specify choices at a higher level. |
| You can adjust any parameters by editing them directly. | Not every setting is exposed. |
| If you make changes, you have to keep track of what you changed when you want to upgrade. | It's easy to separate your customizations from the base installation. |
| Version and audit control as YAML files are stored in a GitHub repository. | Manage custom resources using command-line tools or manifests. |
Extensibility¶
Knative utilizes the existing infrastructure installed on your cluster and provides a developer-facing interface between similar components. The Serving and Eventing components support multiple underlying transports plugins within the same cluster. Serving supports pods with pluggable network ingress routes; and Eventing supports pods with pluggable message transports such as Kafka and RabbitMQ.
For LLM deployments, consider the KServe platform. KServe is a Kubernetes-native model serving platform built on Knative Serving designed for production LLM deployments.
Knative supports installing additional plugins after the initial installation, so your initial choices don't lock you in. For example, you can migrate from one message transport or network ingress to another without losing messages.
Networking plugins¶
If you don't have an ingress that meets the requirements, Knative provides net-kourier, a default lightweight HTTP routing implementation. Plugins include:
-
Istio
Service mesh from Istio. See Installing Istio for Knative.
-
Contour
General-purpose ingress with a goal of enabling multi-team delegation. See Contour.
-
Gateway API
The Kubernetes Gateway API (beta).
Messaging plugins¶
Knative has default lightweight in-memory messaging implementation if you don't already have a solution.
-
Kafka
Distributed event streaming platform from Apache Kafka. In-order, high-thoughput but moderate complexity. See Install Kafka for Knative.
-
RabbitMQ
A messaging and streaming broker from RabbitMQ. In-order, moderate throughput and complexity. See Install RabbitMQ for Knative
-
NATS
An event streaming platform from NATS. Low complexity.
Integration plugins¶
These plugins facilitate Knative operations.
-
cert-manager
For requesting TLS certificates in secure HTTPS connections. See Install cert-manager.
-
Backstage
Plugins for handling Knative backends. See Installing backstage plugins.
Installation resources¶
Use the following links to maintain your installations.