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:

  1. kubectl apply -f https://github.com/knative/serving/releases/download/v0.22.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.

  1. First, install cert-manager version 0.12.0 or higher

  2. Next, install the component that integrates Knative with cert-manager:

    1. kubectl apply -f https://github.com/knative/net-certmanager/releases/download/v0.22.0/release.yaml
  3. 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.

  1. First, install the net-http01 controller:

    1. kubectl apply -f https://github.com/knative/net-http01/releases/download/v0.22.0/release.yaml
  2. Next, configure the certificate.class to use this certificate type.

    1. kubectl patch configmap/config-network \
    2. --namespace knative-serving \
    3. --type merge \
    4. --patch '{"data":{"certificate.class":"net-http01.certificate.networking.knative.dev"}}'
  3. Lastly, enable auto-TLS.

    1. kubectl patch configmap/config-network \
    2. --namespace knative-serving \
    3. --type merge \
    4. --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:

  1. kubectl apply -f https://github.com/knative/serving/releases/download/v0.22.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.

  1. kubectl apply -f https://github.com/knative/serving/releases/download/v0.22.0/serving-domainmapping-crds.yaml
  2. kubectl wait --for=condition=Established --all crd
  3. kubectl apply -f https://github.com/knative/serving/releases/download/v0.22.0/serving-domainmapping.yaml

Install optional Eventing extensions

The tabs below expand to show instructions for installing each Eventing extension.

  1. Install the Kafka controller:

    1. kubectl apply -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.22.0/eventing-kafka-controller.yaml
  2. Install the Kafka Sink data plane:

    1. kubectl apply -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.22.0/eventing-kafka-sink.yaml

For more information, see the Kafka Sink documentation.

The following command installs the Eventing Sugar Controller:

  1. kubectl apply -f https://github.com/knative/eventing/releases/download/v0.22.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):

  1. kubectl label namespace default eventing.knative.dev/injection=enabled

The following command installs the single-tenant Github source:

  1. kubectl apply -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.22.0/github.yaml

The single-tenant GitHub source creates one Knative service per GitHub source.

The following command installs the multi-tenant GitHub source:

  1. kubectl apply -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.22.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:

  1. kubectl apply -f https://github.com/knative-sandbox/eventing-camel/releases/download/v0.22.0/camel.yaml

To learn more about the Apache Camel-K source, try our sample

The following command installs the Apache Kafka Source:

  1. kubectl apply -f https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.22.0/source.yaml

To learn more about the Apache Kafka source, try our sample

The following command installs the GCP Sources:

  1. # This installs both the Sources and the Channel.
  2. kubectl apply -f https://github.com/google/knative-gcp/releases/download/v0.22.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:

  1. kubectl apply -f https://github.com/knative-sandbox/eventing-couchdb/releases/download/v0.22.0/couchdb.yaml

To learn more about the Apache CouchDB source, read the documentation.

The following command installs the VMware Sources and Bindings:

  1. kubectl apply -f https://github.com/vmware-tanzu/sources-for-knative/releases/download/v0.22.0/release.yaml

To learn more about the VMware sources and bindings, try our samples.

Next steps