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-operator and operator-webhook, in ns knative-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.

You (kubectl/Flux) apply KnativeServing CR watches knative-operator uses bundled Knativemanifests creates knative-serving nsDeploys, ConfigMaps, RBAC statusReady

2.Why do we need it ?

Manual install hurts
  • 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.

Remember

Operator = one controller that owns every Knative Deployment, ConfigMap and RBAC rule it installs.

TopicOperator (CR)Manual
Installoperator + 1 CRCRDs, core, ingress
Upgradechange spec.versionre-apply, fix drift
Configspec.configedit ConfigMaps
HA, limitsspec.workloadspatch each Deployment
Driftoperator reverts its keysstays drifted
Extra partyes, the operatorno

Operator itself ?

Upgrade it with its Helm chart first. It knows its own Knative minor and the three before it.

3.The Two CRDs

Both use operator.knative.dev/v1beta1. CR is named like its namespace.

KindNamespaceControls
KnativeServingservingServices, Revisions, autoscaler
KnativeEventingeventingBrokers, Triggers, Channels
Remember

Serving answers HTTP requests. Eventing moves events to your code. Install either one, or both.

knative-operator ns knative-serving ns knative-eventing ns controller,webhook,activator,autoscaler deliversevents Your Service / Broker
In short : The operator owns every Knative Deployment, ConfigMap and RBAC rule; you only write a KnativeServing or KnativeEventing CR.

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.

KnativeServing CR
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

Layerspec keyNote
Istioistio.enabledinstall Istio first
Kourierkourier.enabledlight, set class
Gateway APIgateway-apiCRDs + Gateway
ContourcontourEnvoy based

Tip : turn on one networking layer at a time; the operator does not enforce it.

3.Upgrades

Upgrade Flow
version "1.23"running
edit to "1.24"git commit / apply
rolloutby operator, then Ready=True

One minor at a time: a skip sets VersionMigrationEligible False. One minor down passes.

You edit one line, the operator does the rollout.

4.Handy Commands

CommandWhat it does
helm install knative-operatorInstall the operator (add --create-namespace)
kubectl get knativeserving -o yamlstatus.version and conditions (the list shows only TARGET CLUSTER)
kubectl logs -f deploy/knative-operatorFirst stop if not Ready
kubectl describe knativeservingSee status.conditions
Gotchas
  • 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
Quick Q and A

Upgrade ? bump spec.version

HA ? spec.high-availability.replicas

Serving ? request-driven apps, scale to zero

Eventing ? Brokers and Triggers

In short : Knative Operator turns a KnativeServing or KnativeEventing CR into a running Knative, and keeps it that way.