> ## Documentation Index
> Fetch the complete documentation index at: https://inframan.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Knative (serverless)

> Add Knative to an infrastructure for request-based autoscaling and scale to zero.

**Knative** turns on serverless scaling for web services: they scale on the number of requests in flight, and on non-production infrastructures they can scale all the way to zero when nobody is using them. It's an add-on because its own components need CPU and memory, and an infrastructure that doesn't use it shouldn't pay for them.

## What it changes

A web service's `scaling.type` decides how it runs:

| `scaling.type` | Runs as | Needs Knative |
| - | - | - |
| `concurrency` | A Knative service that scales on requests in flight, and to zero when `min_replicas` is `0` | Yes |
| `hpa` | A Kubernetes Deployment that scales on CPU, and optionally memory | No |
| `"off"` | A Deployment with a fixed number of replicas | No |
| Not set | `concurrency` if Knative is installed, otherwise `hpa` | |

A release with `scaling.type: concurrency` on an infrastructure without Knative fails with `SCALING_TYPE_UNSUPPORTED`, and the error tells you to install Knative or use `hpa`. See [Autoscaling](https://inframan.mintlify.site/optimize/autoscaling.md) and [Scale to zero](https://inframan.mintlify.site/optimize/scale-to-zero.md).

## Install

In the **App Store**, open **Knative** and install it on the infrastructure. An infrastructure has at most one Knative, and it needs the gateway, which every infrastructure has.

Only an Admin can install Knative, from the console. A connected AI assistant can't.

## What you get

* Request-based autoscaling with a `target` number of concurrent requests per pod.
* Scale to zero on non-production infrastructures. While a service is at zero, Knative's activator holds an incoming request until a pod is ready.
* **Actual Concurrency** and **Cold Start Latency** charts in [Observability](https://inframan.mintlify.site/monitor/metrics.md).

Knative's components run on the system pool and are watched by Inframan's [self-healing](https://inframan.mintlify.site/monitor/self-healing.md), which raises their memory or CPU when they run short.

## Uninstall

Uninstalling is refused while any service on the infrastructure uses `scaling.type: concurrency`. Change those services to `hpa` or `"off"` and deploy them first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.