Creating your first Trigger

      YAML

      After you’ve created your YAML file, named something like ce-trigger.yaml, apply it by running the command:

        Expected Output

        trigger.eventing.knative.dev/cloudevents-player created

        Because we didn’t specify a --filter in our command, the Trigger is listening for any CloudEvents coming into the Broker.

        The following example shows how to use Filters.

        Now, when we go back to the CloudEvents Player and send an Event, we see that CloudEvents are both sent and received by the CloudEvents Player:

        What if I want to filter on CloudEvent attributes?

        First, delete your existing Trigger:

          Now let’s add a Trigger that listens for a certain CloudEvent Type

          If you send a CloudEvent with type “some-type,” it is reflected in the CloudEvents Player UI. The Trigger ignores any other types.

          Some people call this “Event-Driven Architecture” which can be used to create your own “Functions as a Service” on Kubernetes 🎉 🔥