To use event-driven architecture on your cluster, install Knative Eventing. You can create Knative components such as event sources, brokers, and channels and then use them to send events to applications or external systems.
After you install the OpenShift Serverless Operator, you can install Knative Eventing by using the default settings, or configure more advanced settings in the KnativeEventing
custom resource (CR). For more information about configuration options for the KnativeEventing
CR, see Global configuration.
If you want to use Red Hat OpenShift distributed tracing with OpenShift Serverless, you must install and configure Red Hat OpenShift distributed tracing before you install Knative Eventing. |
After you install the OpenShift Serverless Operator, install Knative Eventing by using the OpenShift Container Platform web console. You can install Knative Eventing by using the default settings or configure more advanced settings in the KnativeEventing
custom resource (CR).
You have access to an OpenShift Container Platform account with cluster administrator access.
You have logged in to the OpenShift Container Platform web console.
You have installed the OpenShift Serverless Operator.
In the Administrator perspective of the OpenShift Container Platform web console, navigate to Operators → Installed Operators.
Check that the Project dropdown at the top of the page is set to Project: knative-eventing.
Click Knative Eventing in the list of Provided APIs for the OpenShift Serverless Operator to go to the Knative Eventing tab.
Click Create Knative Eventing.
In the Create Knative Eventing page, you can choose to configure the KnativeEventing
object by using either the default form provided, or by editing the YAML.
Using the form is recommended for simpler configurations that do not require full control of KnativeEventing
object creation.
Optional. If you are configuring the KnativeEventing
object using the form, make any changes that you want to implement for your Knative Eventing deployment.
Click Create.
Editing the YAML is recommended for more complex configurations that require full control of KnativeEventing
object creation. You can access the YAML by clicking the edit YAML link in the top right of the Create Knative Eventing page.
Optional. If you are configuring the KnativeEventing
object by editing the YAML, make any changes to the YAML that you want to implement for your Knative Eventing deployment.
Click Create.
After you have installed Knative Eventing, the KnativeEventing
object is created, and you are automatically directed to the Knative Eventing tab. You will see the knative-eventing
custom resource in the list of resources.
Click on the knative-eventing
custom resource in the Knative Eventing tab.
You are automatically directed to the Knative Eventing Overview page.
Scroll down to look at the list of Conditions.
You should see a list of conditions with a status of True, as shown in the example image.
It may take a few seconds for the Knative Eventing resources to be created. You can check their status in the Resources tab. |
If the conditions have a status of Unknown or False, wait a few moments and then check again after you have confirmed that the resources have been created.
After you install the OpenShift Serverless Operator, you can install Knative Eventing by using the default settings, or configure more advanced settings in the KnativeEventing
custom resource (CR). You can use the following procedure to install Knative Eventing by using YAML files and the oc
CLI.
You have access to an OpenShift Container Platform account with cluster administrator access.
You have installed the OpenShift Serverless Operator.
Install the OpenShift CLI (oc
).
Create a file named eventing.yaml
.
Copy the following sample YAML into eventing.yaml
:
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeEventing
metadata:
name: knative-eventing
namespace: knative-eventing
Optional. Make any changes to the YAML that you want to implement for your Knative Eventing deployment.
Apply the eventing.yaml
file by entering:
$ oc apply -f eventing.yaml
Verify the installation is complete by entering the following command and observing the output:
$ oc get knativeeventing.operator.knative.dev/knative-eventing \
-n knative-eventing \
--template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
InstallSucceeded=True
Ready=True
It may take a few seconds for the Knative Eventing resources to be created. |
If the conditions have a status of Unknown
or False
, wait a few moments and then check again after you have confirmed that the resources have been created.
Check that the Knative Eventing resources have been created by entering:
$ oc get pods -n knative-eventing
NAME READY STATUS RESTARTS AGE
broker-controller-58765d9d49-g9zp6 1/1 Running 0 7m21s
eventing-controller-65fdd66b54-jw7bh 1/1 Running 0 7m31s
eventing-webhook-57fd74b5bd-kvhlz 1/1 Running 0 7m31s
imc-controller-5b75d458fc-ptvm2 1/1 Running 0 7m19s
imc-dispatcher-64f6d5fccb-kkc4c 1/1 Running 0 7m18s
If you want to use Knative services you can install Knative Serving.