You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see [4]
You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see [4]

You can use the kn CLI to list and manage available event sources or event source types for use with Knative Eventing.

Currently, kn supports management of the following event source types:

ApiServerSource

Connects a sink to the Kubernetes API server.

PingSource

Periodically sends ping events with a constant payload. It can be used as a timer.

Listing available event source types using kn

Procedure
  • List the available event source types in the terminal:

    $ kn source list-types
    Example output
    TYPE              NAME                                            DESCRIPTION
    ApiServerSource   apiserversources.sources.knative.dev            Watch and send Kubernetes API events to a sink
    PingSource        pingsources.sources.knative.dev                 Periodically send ping events to a sink
    SinkBinding       sinkbindings.sources.knative.dev                Binding for connecting a PodSpecable to a sink
  • You can also list available event source types in YAML format:

    $ kn source list-types -o yaml

Listing available event sources using kn

  • List available event sources by entering the following command:

    $ kn source list
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    a1     ApiServerSource   apiserversources.sources.knative.dev   svc:eshow2   True
    b1     SinkBinding       sinkbindings.sources.knative.dev       svc:eshow3   False
    p1     PingSource        pingsources.sources.knative.dev        svc:eshow1   True

Listing event sources of a specific type only

You can list event sources of a specific type only, by using the --type flag.

  • List available event sources of type PingSource by entering the following command:

    $ kn source list --type PingSource
    Example output
    NAME   TYPE              RESOURCE                               SINK         READY
    p1     PingSource        pingsources.sources.knative.dev        svc:eshow1   True

Next steps