This is a cache of https://docs.openshift.com/serverless/1.33/eventing/discovery/list-event-sources-cli.html. It is a snapshot of the page at 2024-11-25T16:43:33.470+0000.
Listing event sources from the command line - Event discovery | Eventing | Red Hat OpenShift Serverless 1.33
×

Using the Knative (kn) cli provides a streamlined and intuitive user interface to view existing event sources on your cluster.

Listing available event sources by using the Knative cli

You can list existing event sources by using the kn source list command.

Prerequisites
  • The OpenShift Serverless Operator and Knative Eventing are installed on the cluster.

  • You have installed the Knative (kn) cli.

Procedure
  1. List the existing event sources in the terminal:

    $ kn source list
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    a1     ApiServerSource   apiserversources.sources.knative.dev   ksvc:eshow2   True
    b1     SinkBinding       sinkbindings.sources.knative.dev       ksvc:eshow3   False
    p1     PingSource        pingsources.sources.knative.dev        ksvc:eshow1   True
  2. Optional: You can list event sources of a specific type only, by using the --type flag:

    $ kn source list --type <event_source_type>
    Example command
    $ kn source list --type PingSource
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    p1     PingSource        pingsources.sources.knative.dev        ksvc:eshow1   True