Using Triggers

    The value must be a Destination.

    The following trigger receives all the events from the default broker and delivers them to the Knative Serving service my-service:

    1. Apply the YAML file by running the command:

      1. kubectl apply -f <filename>.yaml

    The following trigger receives all the events from the default broker and delivers them to the custom path for the Kubernetes service my-service:

    1. Create a YAML file using the following example:

    2. Apply the YAML file by running the command:

        Where <filename> is the name of the file you created in the previous step.

      This example filters events from the default broker that are of type dev.knative.foo.bar and have the extension with the value my-extension-value.

      1. Create a YAML file using the following example:

      2. Apply the YAML file by running the command:

        1. kubectl apply -f <filename>.yaml

        Where <filename> is the name of the file you created in the previous step.

      • eventing.knative.dev/injection: if set to enabled, Eventing automatically creates a Broker for a Trigger if it doesn’t exist. The Broker is created in the namespace where the Trigger is created. This annotation only works if you have the enabled, which is optional and not enabled by default.

      The following YAML is an example of a Trigger with a dependency: