Event sources

An event source is a Kubernetes custom resource (CR), created by a developer or cluster administrator, that acts as a link between an event producer and an event sink. A sink can be a k8s service, including Knative Services, a Channel, or a Broker that receives events from an event source.

Event sources are created by instantiating a CR from a Source object. The Source object defines the arguments and parameters needed to instantiate a CR.

All Sources are part of the sources category.

kn

You can list existing event sources on your cluster by entering the kn command:

  1. kn source list

kubectl

You can list existing event sources on your cluster by entering the command:

  1. kubectl get sources

Knative Sources

NameAPI VersionMaintainerDescription
APIServerSourcev1KnativeBrings Kubernetes API server events into Knative. The APIServerSource fires a new event each time a Kubernetes resource is created, updated or deleted.
AWS SQSv1alpha1KnativeBrings AWS Simple Queue Service messages into Knative. The AwsSqsSource fires a new event each time an event is published on an AWS SQS topic.
Apache CamelN/AApache Software FoundationEnables use of Apache Camel components for pushing events into Knative. Camel sources are now provided via Kamelets as part of the Apache Camel K project.
Apache CouchDBv1alpha1KnativeBrings Apache CouchDB messages into Knative.
Apache Kafkav1beta1KnativeBrings Apache Kafka messages into Knative. The KafkaSource reads events from an Apache Kafka Cluster, and passes these events to a sink so that they can be consumed. See the Kafka Source example for more details.
ContainerSourcev1KnativeThe ContainerSource will instantiate container image(s) that can generate events until the ContainerSource is deleted. This may be used, for example, to poll an FTP server for new files or generate events at a set time interval. Given a spec.template with at least a container image specified, ContainerSource will keep a Pod running with the specified image(s). K_SINK (destination address) and KE_CE_OVERRIDES (JSON CloudEvents attributes) environment variables are injected into the running image(s). It is used by multiple other Sources as underlying infrastructure. Refer to the Container Source example for more details.
GitHubv1alpha1KnativeRegisters for events of the specified types on the specified GitHub organization or repository, and brings those events into Knative. The GitHubSource fires a new event for selected GitHub event types. See the GitHub Source example for more details.
GitLabv1alpha1KnativeRegisters for events of the specified types on the specified GitLab repository, and brings those events into Knative. The GitLabSource creates a webhooks for specified event types, listens for incoming events, and passes them to a consumer. See the GitLab Source example for more details.
HeartbeatsN/AKnativeUses an in-memory timer to produce events at the specified interval.
KogitoSourcev1alpha1KnativeAn implementation of the Kogito Runtime custom resource managed by the Kogito Operator.
PingSourcev1beta2KnativeProduces events with a fixed payload on a specified Cron schedule. See the Ping Source example for more details.
RabbitMQActive developmentNoneBrings RabbitMQ messages into Knative.
SinkBindingv1KnativeThe SinkBinding can be used to author new event sources using any of the familiar compute abstractions that Kubernetes makes available (e.g. Deployment, Job, DaemonSet, StatefulSet), or Knative abstractions (e.g. Service, Configuration). SinkBinding provides a framework for injecting K_SINK (destination address) and K_CE_OVERRIDES (JSON cloudevents attributes) environment variables into any Kubernetes resource which has a spec.template that looks like a Pod (aka PodSpecable). See the SinkBinding example for more details.
WebSocketN/AKnativeOpens a WebSocket to the specified source and packages each received message as a Knative event.

Third-Party Sources

NameAPI VersionMaintainerDescription
Auto Container SourceProof of ConceptNoneAutoContainerSource is a controller that allows the Source CRDs without needing a controller. It notices CRDs with a specific label and starts controlling resources of that type. It utilizes Container Source as underlying infrastructure.
Amazon CloudWatchSupportedTriggerMeshCollects metrics from Amazon CloudWatch.
Amazon CloudWatch LogsSupportedTriggerMeshSubscribes to log events from an Amazon CloudWatch Logs stream.
Amazon CodeCommitSupportedTriggerMeshRegisters for events emitted by an Amazon CodeCommit source code repository.
Amazon Cognito IdentitySupportedTriggerMeshRegisters for events from Amazon Cognito identity pools.
Amazon Cognito UserSupportedTriggerMeshRegisters for events from Amazon Cognito user pools.
Amazon DynamoDBSupportedTriggerMeshReads records from an Amazon DynamoDB stream.
Amazon KinesisSupportedTriggerMeshReads records from an Amazon Kinesis stream.
Amazon SNSSupportedTriggerMeshSubscribes to messages from an Amazon SNS topic.
Amazon SQSSupportedTriggerMeshConsumes messages from an Amazon SQS queue.
BitBucketProof of ConceptNoneRegisters for events of the specified types on the specified BitBucket organization/repository. Brings those events into Knative.
CloudAuditLogsSourcev1GoogleRegisters for events of the specified types on the specified Google Cloud Audit Logs. Brings those events into Knative. Refer to the CloudAuditLogsSource example for more details.
CloudPubSubSourcev1GoogleBrings Cloud Pub/Sub messages into Knative. The CloudPubSubSource fires a new event each time a message is published on a Google Cloud Platform PubSub topic. See the CloudPubSubSource example for more details.
CloudSchedulerSourcev1GoogleCreate, update, and delete Google Cloud Scheduler Jobs. When those jobs are triggered, receive the event inside Knative. See the CloudSchedulerSource example for further details.
CloudStorageSourcev1GoogleRegisters for events of the specified types on the specified Google Cloud Storage bucket and optional object prefix. Brings those events into Knative. See the CloudStorageSource example.
DockerHubSourcev1alpha1NoneRetrieves events from Docker Hub Webhooks and transforms them into CloudEvents for consumption in Knative.
FTP / SFTPProof of conceptNoneWatches for files being uploaded into a FTP/SFTP and generates events for those.
GitHub Issue CommentsProof of ConceptNonePolls a specific GitHub issue for new comments.
HeartbeatProof of ConceptNoneUses an in-memory timer to produce events as the specified interval. Uses AutoContainerSource for underlying infrastructure.
KonnekActive DevelopmentNoneRetrieves events from cloud platforms (like AWS and GCP) and transforms them into CloudEvents for consumption in Knative.
K8sProof of ConceptNoneBrings Kubernetes cluster events into Knative. Uses AutoContainerSource for underlying infrastructure.
RedisSourcev1alpha1NoneBrings Redis Stream into Knative.
Slackv1alpha1TriggerMeshSubscribes to events from Slack.
VMwareActive DevelopmentVMwareBrings vSphere events into Knative.
Zendeskv1alpha1TriggerMeshSubscribes to events from Zendesk.

Additional resources