Knative
  • Documentation v0.20 Release: v0.20
    v0.21 v0.20 v0.19 v0.18 Archives Pre-release
  • Blog
  • Community

Black lives matter.

We stand in solidarity with the Black community.
Racism is unacceptable.
It conflicts with the core values of the Knative project and our community does not tolerate it.

Documentation v0.20 Release: v0.20
v0.21 v0.20 v0.19 v0.18 Archives Pre-release
  • Documentation
      • Installing Knative
        • Installing Knative Installing Knative components using Operator Installing the Knative CLI Installing Istio for Knative Checking your install version Configuring the Serving Operator Custom Resource Upgrading your installation
          • Collecting logs
          Configuring the Eventing Operator custom resource
      Connecting to your cluster Knative Offerings
      • Serving Component
        • Getting started Knative Kubernetes Services Custom-metrics API Deploying from private registries
          • Services
            • Deployment Configuration Creating Knative services
          Accessing request traces
          • Autoscaling
            • Autoscaling concepts Metrics Targets Configuring scale to zero Configuring concurrency Configuring scale bounds Configuring target burst capacity Configuring the requests per second (RPS) target Additional autoscaling configuration for Knative Pod Autoscaler Autoscale Sample App - Go
          Configuring cluster-local services Creating and using Subroutes Debugging issues with your application Enabling requests to Knative services when additional authorization policies are enabled Assigning static IPs - GKE Configuring high-availability components Feature/Extension Flags Configuring the ingress gateway Setting up a custom domain Setting up a custom domain per Service Configuring HTTPS connections Installing cert-manager Configuring HTTPS with Cloud DNS Creating Domain Mappings (Alpha) Enabling auto TLS certs Exclude namespaces from the Knative webhook Using ExternalDNS on Google Cloud Platform to automate DNS setup Tag resolution
          • Code samples
              • Cloud Events apps
                • .NET Go Java and Spring Java and Vert.x Node.js Rust
              GitHub Webhook - Go gRPC Server - Go
              • Hello world apps
                • .NET Go Java (Spark) Java (Spring) Kotlin Node.js PHP Python Ruby Scala Shell
              multi-container samples RESTful service - Go Routing services - Go Secrets - Go Tag Header Based Routing Traffic splitting Routing and managing traffic
      • Eventing Component
        • Getting started
          • Event sources
            • APIServerSource ContainerSource PingSource Sink binding
          Event registry
          • Flows
            • Parallel Sequence
          • Channels
            • Channel types and defaults Creating channels Available Channels
          • Sugar Controller
          Event delivery
          • Broker
            • Apache Kafka Broker Default Broker ConfigMap Kafka Channel ConfigMap
              • Alternate Brokers
          • Sink
            • Apache Kafka Sink
          • Triggers
          Debugging Accessing CloudEvent traces
          • Code samples
            • Camel source
              • Apache Kafka
                • Binding Example Channel Example Source Example
              Container source
              • Event Source - easy way
              • Hello World
                  • GO
                  • Python
              • Parallel
                  • Multiple Cases
                  • Mutual Exclusivity
              PingSource
              • Sequences
                • Create additional events Displaying sequence output Using Sequences in series Using with Broker and Trigger
              CloudAuditLogsSource CloudPubSubSource CloudSchedulerSource CloudStorageSource GitHub source GitLab source IoT core Kubernetes event
              • Writing an Event Source
                • Design of an Event Source Lifecycle and Types Controller Implemetation Reconciler Implementation Receive Adapter Implementation Publishing to your cluster Moving to knative-sandbox
      Code samples
      • Reference
          • Release notes
          • API
            • Serving API
              • Eventing API
          Additional resources
View/Edit this page Create documentation issue
  1. Documentation
  2. Eventing Component
  3. Code samples

Knative Eventing code samples

Use the following code samples to help you understand the various use cases for Knative Eventing and Event Sources. Learn more about Knative Eventing and Eventing Sources.

See all Knative code samples

Table of contents
  • Camel source
  • Apache Kafka
    • Binding Example
    • Channel Example
    • Source Example
  • Container source
  • Event Source - easy way
  • Hello World
    • GO
    • Python
  • Parallel
    • Multiple Cases
    • Mutual Exclusivity
  • PingSource
  • Sequences
    • Create additional events
    • Displaying sequence output
    • Using Sequences in series
    • Using with Broker and Trigger
  • CloudAuditLogsSource
  • CloudPubSubSource
  • CloudSchedulerSource
  • CloudStorageSource
  • GitHub source
  • GitLab source
  • IoT core
  • Kubernetes event
  • Writing an Event Source
    • Design of an Event Source
    • Lifecycle and Types
    • Controller Implemetation
    • Reconciler Implementation
    • Receive Adapter Implementation
    • Publishing to your cluster
    • Moving to knative-sandbox

We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.

× OK
Knative users
Knative developers

© 2021 The Knative Authors | Privacy Policy | Cookie Usage | Knative Licensing
CC By 4.0, Apache 2.0

We use cookies. Google Analytics is used to improve your experience and help us understand site traffic and page usage.


Learn about analytics cookies and how you can take steps to opt-out from sharing your usage data.