11.2. Using the Knative CLI to list event sources and event source types


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:

API server source
Connects a sink to the Kubernetes API server by creating an APIServerSource object.
Ping source
Periodically sends ping events with a constant payload. A ping source can be used as a timer, and is created as a PingSource object.

You can list the available event source types in the terminal by using the following command:

$ kn source list-types
Copy to Clipboard Toggle word wrap

The default output for this command will look like:

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
Copy to Clipboard Toggle word wrap

It is also possible to list available event source types in YAML format:

$ kn source list-types -o yaml
Copy to Clipboard Toggle word wrap

You can list the available event sources in the terminal by entering the following command:

$ kn source list
Copy to Clipboard Toggle word wrap

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
Copy to Clipboard Toggle word wrap

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

$ kn source list --type PingSource
Copy to Clipboard Toggle word wrap

Example output

NAME   TYPE              RESOURCE                               SINK         READY
p1     PingSource        pingsources.sources.knative.dev        ksvc:eshow1   True
Copy to Clipboard Toggle word wrap

11.2.3. Next steps

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat