Serverless
Knative Operator
Knative Operator : install Knative with two small YAML files
1.What is the Knative Operator ?
A controller that installs, upgrades and configures Knative Serving and Eventing for you.
- You write a KnativeServing or KnativeEventing CR
- The operator reconciles it into a full Knative
- Runs as two Deployments,
knative-operatorandoperator-webhook, in nsknative-operator(helm--create-namespace) - Part of the Knative project (CNCF graduated, TOC vote 2025-09-11)
Tip : a hand edit to a ConfigMap key the CR sets is reverted; a key the CR does not set stays. Edit the CR instead.
2.Why do we need it ?
- Many big manifests, right order
- Upgrades by hand, drift creeps in
- ConfigMaps get edited ad hoc
- HA and limits patch many Deployments
Fix : declare Knative in one CR. GitOps friendly.
Operator = one controller that owns every Knative Deployment, ConfigMap and RBAC rule it installs.
| Topic | Operator (CR) | Manual |
|---|---|---|
| Install | operator + 1 CR | CRDs, core, ingress |
| Upgrade | change spec.version | re-apply, fix drift |
| Config | spec.config | edit ConfigMaps |
| HA, limits | spec.workloads | patch each Deployment |
| Drift | operator reverts its keys | stays drifted |
| Extra part | yes, the operator | no |
Operator itself ?
3.The Two CRDs
Both use operator.. CR is named like its namespace.
| Kind | Namespace | Controls |
|---|---|---|
| KnativeServing | serving | Services, Revisions, autoscaler |
| KnativeEventing | eventing | Brokers, Triggers, Channels |
Serving answers HTTP requests. Eventing moves events to your code. Install either one, or both.
1.Key spec fields
- versionpins Knative, change it to upgrade
- config.<map>keys go into Knative ConfigMaps
- ingressistio, kourier, contour or gateway-api
- high-availabilityreplicas for control plane
- workloads / servicesreplicas, resources, nodeSelector, env
- registryimage rewrite, imagePullSecrets (air-gapped)
All of it lives under spec.
apiVersion: operator.knative.dev/v1beta1 kind: KnativeServing metadata: name: knative-serving namespace: knative-serving spec: version: "1.24" ingress: kourier: enabled: true config: network: ingress-class: kourier.ingress.networking.knative.dev high-availability: replicas: 3
2.Networking layer
| Layer | spec key | Note |
|---|---|---|
| Istio | istio.enabled | install Istio first |
| Kourier | kourier.enabled | light, set class |
| Gateway API | gateway-api | CRDs + Gateway |
| Contour | contour | Envoy based |
Tip : turn on one networking layer at a time; the operator does not enforce it.
3.Upgrades
One minor at a time: a skip sets VersionMigrationEligible False. One minor down passes.
4.Handy Commands
| Command | What it does |
|---|---|
helm install knative-operator | Install the operator (add --create-namespace) |
kubectl get knativeserving -o yaml | status.version and conditions (the list shows only TARGET CLUSTER) |
kubectl logs -f deploy/ | First stop if not Ready |
kubectl describe knativeserving | See status.conditions |
- Create the namespace first
- Never hand-edit Knative ConfigMaps
- No networking layer means no routes
- Delete CRs before removing the operator
- Operator is one more thing to upgrade
- Keep the CR in ns
knative-serving - Ready Unknown, IngressNotConfigured ? no ingress yet
- spec.version must be one it ships
Upgrade ? bump spec.version
HA ? spec.high-availability.replicas
Serving ? request-driven apps, scale to zero
Eventing ? Brokers and Triggers