// Module included in the following assemblies:
//
// * /serverless/install/installing-knative-eventing.adoc

:_mod-docs-content-type: PROCEDURE
[id="serverless-install-eventing-yaml_{context}"]
= Installing Knative Eventing by using YAML

After you install the {ServerlessOperatorName}, 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.

.Prerequisites

ifdef::openshift-enterprise[]
* You have access to an {product-title} account with cluster administrator access.
endif::[]

ifdef::openshift-dedicated,openshift-rosa[]
* You have access to an {product-title} account with cluster administrator or dedicated administrator access.
endif::[]

* You have installed the {ServerlessOperatorName}.
* Install the OpenShift CLI (`oc`).

.Procedure

. Create a file named `eventing.yaml`.
. Copy the following sample YAML into `eventing.yaml`:
+
[source,yaml]
----
apiVersion: operator.knative.dev/v1beta1
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:
+
[source,terminal]
----
$ oc apply -f eventing.yaml
----

.Verification

. Verify the installation is complete by entering the following command and observing the output:
+
[source,terminal]
----
$ oc get knativeeventing.operator.knative.dev/knative-eventing \
  -n knative-eventing \
  --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
----
+
.Example output
[source,terminal]
----
InstallSucceeded=True
Ready=True
----
+
[NOTE]
====
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:
+
[source,terminal]
----
$ oc get pods -n knative-eventing
----
+
.Example output
[source,terminal]
----
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
----
