Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.39 KB

brokercreation.md

File metadata and controls

61 lines (42 loc) · 1.39 KB

Broker Creation

You can create Broker in the namespace in 2 ways:

  1. Automatically by labelling the namespace.
  2. Manually.

Automatically

Broker can be injected into a namespace by labelling it with eventing.knative.dev/injection=enabled but this requires Sugar Controller to be installed.

If you installed Knative Eventing with instructions in setup, you have Sugar Controller installed:

kubectl get pods -n knative-eventing

sugar-controller-55c4fb657b-jrh52      1/1     Running

Create a Broker in the default namespace by labelling the namespace:

kubectl label ns default eventing.knative.dev/injection=enabled

Manual

Create a Broker in the default namespace:

kubectl create -f - <<EOF
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
  name: default
  namespace: default
EOF

Check Broker

After creating the Broker, you should see a Broker in the default namespace:

kubectl get broker

NAME      READY   REASON   URL
default   True             http://broker-ingress.knative-eventing.svc.cluster.local/default/default

There's also a default InMemoryChannel created and used by the Broker (but default channel can be configured):

kubectl get channel

NAME
inmemorychannel.messaging.knative.dev/default-kne-trigger