Skip to content

Knative Serving code samples

Use the following code samples to help you understand the various Knative Serving resources and how they can be applied across common use cases. Learn more about Knative Serving.

See all Knative code samples in GitHub.

Name Description Languages
Hello World A quick introduction that highlights how to deploy an app using Knative Serving. C#, Go, Java (Spark), Java (Spring), Kotlin, Node.js, PHP, Python, Ruby, Scala, Shell
Cloud Events A quick introduction that highlights how to send and receive Cloud Events. C#, Go, Node.js, Rust, Java (Vert.x)
Traffic Splitting An example of manual traffic splitting. YAML
Advanced Deployment Simple blue/green-like application deployment pattern illustrating the process of updating a live application without dropping any traffic. YAML
Autoscale A demonstration of the autoscaling capabilities of Knative. Go
Github Webhook A simple webhook handler that demonstrates interacting with Github. Go
gRPC A simple gRPC server. Go
Knative Routing An example of mapping multiple Knative services to different paths under a single domain name using the Istio VirtualService concept. Go
Kong Routing An example of mapping multiple Knative services to different paths under a single domain name using the Kong API gateway. Go
Knative Secrets A simple app that demonstrates how to use a Kubernetes secret as a Volume in Knative. Go
Multi Container A quick introduction that highlights how to build and deploy an app using Knative Serving for multiple containers. Go

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