@@ -21,17 +21,15 @@ kubectl create namespace event-example
21
21
22
22
The [ broker] ( broker/README.md ) allows you to route events to different event sinks or consumers.
23
23
24
- 1 . Add a broker named ` default ` to your namespace by creating a YAML file using
25
- the following template:
24
+ 1 . Add a broker named ` default ` to your namespace by copying the following YAML into a file:
26
25
27
26
``` yaml
28
27
apiVersion : eventing.knative.dev/v1
29
- kind: broker
28
+ kind : Broker
30
29
metadata :
31
30
name : default
32
- namespace: <namespace>
31
+ namespace : event-example
33
32
` ` `
34
- Where `<namespace>` is your namespace.
35
33
36
34
1. Apply the YAML file by running the command:
37
35
@@ -43,9 +41,8 @@ the following template:
43
41
1. Verify that the broker is working correctly, by entering the following command :
44
42
45
43
` ` ` bash
46
- kubectl -n < namespace > get broker default
44
+ kubectl -n event-example get broker default
47
45
` ` `
48
- Where ` < namespace> ` is your namespace.
49
46
50
47
This shows information about your broker. If the broker is working correctly, it shows a `READY` status of `True` :
51
48
@@ -69,6 +66,7 @@ demonstrate how you can configure your event producers to target a specific cons
69
66
kind: Deployment
70
67
metadata:
71
68
name: hello-display
69
+ namespace: event-example
72
70
spec:
73
71
replicas: 1
74
72
selector:
@@ -88,6 +86,7 @@ demonstrate how you can configure your event producers to target a specific cons
88
86
apiVersion: v1
89
87
metadata:
90
88
name: hello-display
89
+ namespace: event-example
91
90
spec:
92
91
selector:
93
92
app: hello-display
@@ -112,6 +111,7 @@ into a file:
112
111
kind: Deployment
113
112
metadata:
114
113
name: goodbye-display
114
+ namespace: event-example
115
115
spec:
116
116
replicas: 1
117
117
selector:
@@ -132,6 +132,7 @@ into a file:
132
132
apiVersion: v1
133
133
metadata:
134
134
name: goodbye-display
135
+ namespace: event-example
135
136
spec:
136
137
selector:
137
138
app: goodbye-display
@@ -173,6 +174,7 @@ Each trigger can specify a filter that enables selection of relevant events base
173
174
kind: Trigger
174
175
metadata:
175
176
name: hello-display
177
+ namespace: event-example
176
178
spec:
177
179
broker: default
178
180
filter:
@@ -200,6 +202,7 @@ Each trigger can specify a filter that enables selection of relevant events base
200
202
kind: Trigger
201
203
metadata:
202
204
name: goodbye-display
205
+ namespace: event-example
203
206
spec:
204
207
broker: default
205
208
filter:
@@ -253,6 +256,7 @@ The broker can only be accessed from within the cluster where Knative Eventing i
253
256
labels:
254
257
run: curl
255
258
name: curl
259
+ namespace: event-example
256
260
spec:
257
261
containers:
258
262
# This could be any image that we can SSH into and has curl.
@@ -334,7 +338,7 @@ The broker can only be accessed from within the cluster where Knative Eventing i
334
338
< Date: Mon, 12 Aug 2019 19:48:18 GMT
335
339
` ` `
336
340
- To make the third request, which creates an event that has the `type`
337
- `greeting` and the`source` `sendoff`, run the following in the SSH terminal:
341
+ `greeting` and the `source` `sendoff`, run the following in the SSH terminal :
338
342
` ` ` bash
339
343
curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/event-example/default" \
340
344
-X POST \
0 commit comments