@@ -186,56 +186,13 @@ First start streaming the logs for the event consumers:
186
186
stern eventing -c user-container
187
187
----
188
188
189
- Then create a pod for using the `curl` command:
190
-
191
- [source,yaml]
192
- ----
193
- apiVersion: v1
194
- kind: Pod
195
- metadata:
196
- labels:
197
- run: curler
198
- name: curler
199
- spec:
200
- containers:
201
- - name: curler
202
- image: fedora:29 # <1>
203
- tty: true
204
- ----
205
-
206
- <1> You can use any image that includes a curl command.
207
-
208
- Wait for the `curler` pod to be running and then exec into the `curler` pod:
209
-
210
- [#trigger-verify-curler]
211
- [.console-input]
212
- [source,bash,subs="+macros,+attributes"]
213
- -----
214
- kubectl -n {tutorial-namespace} apply -f curler.yaml
215
- -----
216
-
217
- Exec into the `curler` pod:
218
-
219
- [trigger-verify-exec-curler]
220
- [.console-input]
221
- [source,bash,subs="+macros,+attributes"]
222
- ----
223
- kubectl -n {tutorial-namespace} exec -it curler -- /bin/bash
224
- ----
225
-
226
- Using the `curler` pod's shell, curl the broker URI for eventingaloha:
189
+ Using the https://github.com/knative-sandbox/kn-plugin-event[kn-event plugin] of the Knative CLI, we will now send a CloudEvent to the broker of type `aloha`:
227
190
228
191
[.console-input]
229
192
[source,bash,subs="+macros,+attributes"]
230
193
----
231
- curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/{tutorial-namespace}/default" \
232
- -X POST \
233
- -H "Ce-Id: say-hello" \
234
- -H "Ce-Specversion: 1.0" \
235
- -H "Ce-Type: aloha" \
236
- -H "Ce-Source: mycurl" \
237
- -H "Content-Type: application/json" \
238
- -d '{"key":"from a curl"}'
194
+ kn event send -t aloha -f origin="from kn-event" \
195
+ --to Broker:eventing.knative.dev/v1:default
239
196
----
240
197
241
198
You will then see `eventingaloha` will scale-up to respond to that event:
@@ -253,23 +210,16 @@ The command above should show the following output:
253
210
[source,bash]
254
211
-----
255
212
NAME READY STATUS AGE
256
- curler 1/1 Running 59s
257
213
eventingaloha-1-deployment-6cdc888d9d-9xnnn 2/2 Running 30s
258
214
-----
259
215
260
- Next, curl the broker URI for `eventingbonjour `:
216
+ Next, send another event, this time of type `bonjour `:
261
217
262
218
[.console-input]
263
219
[source,bash,subs="+macros,+attributes"]
264
220
----
265
- curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/{tutorial-namespace}/default" \
266
- -X POST \
267
- -H "Ce-Id: say-hello" \
268
- -H "Ce-Specversion: 1.0" \
269
- -H "Ce-Type: bonjour" \
270
- -H "Ce-Source: mycurl" \
271
- -H "Content-Type: application/json" \
272
- -d '{"key":"from a curl"}'
221
+ kn event send -t bonjour -f origin="from kn-event" \
222
+ --to Broker:eventing.knative.dev/v1:default
273
223
----
274
224
275
225
And you will see the `eventingbonjour` pod scale up:
@@ -287,7 +237,6 @@ The command above should show the following output:
287
237
[source,bash]
288
238
-----
289
239
NAME READY STATUS AGE
290
- curler 1/1 Running 82s
291
240
eventingbonjour-1-deployment-fc7858b5b-s9prj 2/2 Running 5s
292
241
-----
293
242
0 commit comments