mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * serverless/event_workflows/serverless-using-brokers.adoc
|
|
|
|
[id="serverless-creating-broker-admin_{context}"]
|
|
= Creating a broker by labeling a namespace
|
|
|
|
If you have cluster administrator permissions, you can create the `default` broker automatically by labeling a namespace.
|
|
|
|
[NOTE]
|
|
====
|
|
Brokers created using this method will not be removed if you remove the label. You must manually delete them.
|
|
====
|
|
|
|
.Prerequisites
|
|
* The {ServerlessOperatorName} and Knative Eventing are installed on your {product-title} cluster.
|
|
* You have cluster administrator permissions for {product-title}.
|
|
|
|
.Procedure
|
|
|
|
* Label a namespace with `eventing.knative.dev/injection=enabled`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc label namespace <namespace> eventing.knative.dev/injection=enabled
|
|
----
|
|
|
|
.Verification steps
|
|
|
|
You can verify that the broker has been created successfully by using the `oc` CLI, or by observing it in the *Topology* view in the web console.
|
|
|
|
. Use the `oc` command to get the broker:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n <namespace> get broker <broker_name>
|
|
----
|
|
+
|
|
.Example command
|
|
[source,terminal]
|
|
----
|
|
$ oc -n default get broker default
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME READY REASON URL AGE
|
|
default True http://broker-ingress.knative-eventing.svc.cluster.local/test/default 3m56s
|
|
----
|
|
|
|
. Navigate to the *Topology* view in the web console, and observe that the broker exists:
|
|
+
|
|
image::odc-view-broker.png[View the broker in the web console Topology view]
|