Installing optional extensions
To add extra features to your Knative Serving or Eventing installation, you can install extensions by applying YAML files using the kubectl
CLI.
For information about the YAML files in the Knative Serving and Eventing releases, see Installation files.
Prerequisites
Before you install any optional extensions, you must install Knative Serving or Eventing. See Installing Serving using YAML files and Installing Eventing using YAML files.
Install optional Serving extensions
The tabs below expand to show instructions for installing each Serving extension.
Knative also supports the use of the Kubernetes Horizontal Pod Autoscaler (HPA) for driving autoscaling decisions. The following command will install the components needed to support HPA-class autoscaling:
kubectl apply -f https://github.com/knative/serving/releases/download/v0.23.0/serving-hpa.yaml
Knative supports automatically provisioning TLS certificates via cert-manager. The following commands will install the components needed to support the provisioning of TLS certificates via cert-manager.
First, install cert-manager version
0.12.0
or higherNext, install the component that integrates Knative with cert-manager:
kubectl apply -f https://github.com/knative/net-certmanager/releases/download/v0.23.0/release.yaml
Now configure Knative to automatically configure TLS certificates.
Knative supports automatically provisioning TLS certificates using Let’s Encrypt HTTP01 challenges. The following commands will install the components needed to support that.
First, install the
net-http01
controller:kubectl apply -f https://github.com/knative/net-http01/releases/download/v0.23.0/release.yaml
Next, configure the
certificate.class
to use this certificate type.kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"certificate.class":"net-http01.certificate.networking.knative.dev"}}'
Lastly, enable auto-TLS.
kubectl patch configmap/config-network \
--namespace knative-serving \
--type merge \
--patch '{"data":{"autoTLS":"Enabled"}}'
If you are using a Certificate implementation that supports provisioning wildcard certificates (e.g. cert-manager with a DNS01 issuer), then the most efficient way to provision certificates is with the namespace wildcard certificate controller. The following command will install the components needed to provision wildcard certificates in each namespace:
kubectl apply -f https://github.com/knative/serving/releases/download/v0.23.0/serving-nscert.yaml
Note this will not work with HTTP01 either via cert-manager or the net-http01 options.
The DomainMapping
CRD allows a user to map a Domain Name that they own to a specific Knative Service.
kubectl apply -f https://github.com/knative/serving/releases/download/v0.23.0/serving-domainmapping-crds.yaml
kubectl wait --for=condition=Established --all crd
kubectl apply -f https://github.com/knative/serving/releases/download/v0.23.0/serving-domainmapping.yaml
Install optional Eventing extensions
The tabs below expand to show instructions for installing each Eventing extension.
- Apache Kafka Sink
- Sugar Controller
- Github Source
- Apache Camel-K Source
- Apache Kafka Source
- GCP Sources
- Apache CouchDB Source
- VMware Sources and Bindings
Install the Kafka controller:
kubectl apply -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-controller.yaml
Install the Kafka Sink data plane:
kubectl apply -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-sink.yaml
For more information, see the Kafka Sink documentation.
The following command installs the Eventing Sugar Controller:
kubectl apply -f https://github.com/knative/eventing/releases/download/v0.23.0/eventing-sugar-controller.yaml
The Knative Eventing Sugar Controller will react to special labels and annotations and produce Eventing resources. For example:
- When a Namespace is labeled with
eventing.knative.dev/injection=enabled
, the controller will create a default broker in that namespace. - When a Trigger is annotated with
eventing.knative.dev/injection=enabled
, the controller will create a Broker named by that Trigger in the Trigger’s Namespace.
The following command enables the default Broker on a namespace (here default
):
kubectl label namespace default eventing.knative.dev/injection=enabled
The following command installs the single-tenant Github source:
kubectl apply -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.23.0/github.yaml
The single-tenant GitHub source creates one Knative service per GitHub source.
The following command installs the multi-tenant GitHub source:
kubectl apply -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.23.0/mt-github.yaml
The multi-tenant GitHub source creates only one Knative service handling all GitHub sources in the cluster. This source does not support logging or tracing configuration yet.
To learn more about the Github source, try our sample
The following command installs the Apache Camel-K Source:
kubectl apply -f https://github.com/knative-sandbox/eventing-camel/releases/download/v0.23.0/camel.yaml
To learn more about the Apache Camel-K source, try our sample
The following command installs the Apache Kafka Source:
kubectl apply -f https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.23.0/source.yaml
To learn more about the Apache Kafka source, try our sample
The following command installs the GCP Sources:
# This installs both the Sources and the Channel.
kubectl apply -f https://github.com/google/knative-gcp/releases/download/v0.23.0/cloud-run-events.yaml
To learn more about the Cloud Pub/Sub source, try our sample.
To learn more about the Cloud Storage source, try our sample.
To learn more about the Cloud Scheduler source, try our sample.
To learn more about the Cloud Audit Logs source, try our sample.
The following command installs the Apache CouchDB Source:
kubectl apply -f https://github.com/knative-sandbox/eventing-couchdb/releases/download/v0.23.0/couchdb.yaml
To learn more about the Apache CouchDB source, read the documentation.
The following command installs the VMware Sources and Bindings:
kubectl apply -f https://github.com/vmware-tanzu/sources-for-knative/releases/download/v0.23.0/release.yaml
To learn more about the VMware sources and bindings, try our samples.
Next steps
- To easily interact with Knative Services and Eventing components, install the
kn
CLI