knative-tutorial icon indicating copy to clipboard operation
knative-tutorial copied to clipboard

A collection of samples for Knative Serving, Knative Eventing and Knative-GCP projects.

trafficstars

Knative Tutorial

This tutorial shows how to use different parts of Knative.

Slides

There's a presentation that accompanies the tutorial.

Serverless with Knative

Setup

You need to install Knative and its dependencies (eg. Istio). See Knative Installation page for official instructions your platform.

Alternatively, there are scripts in setup folder to install Knative, Istio on Google Kubernetes Engine (GKE). You can follow the instructions there.

We tested this tutorial on:

  • GKE: 1.21.5-gke.1300
  • Istio: 1.10.5
  • Knative Serving: 1.0.0
  • Knative Eventing: 1.0.0
  • Knative-GCP: 0.23.0
  • Tekton: 0.22.0

If everything worked, all Knative components should show a STATUS of Running:

kubectl get pods -n knative-serving
kubectl get pods -n knative-eventing
kubectl get pods -n cloud-run-events
kubectl get pods -n tekton-pipelines

Samples

Knative Serving

  • Hello World Serving
  • Change configuration
  • Traffic splitting
  • Configure autoscaling
  • Deploy to Cloud Run
  • gRPC with Knative
  • Cluster local services
  • Integrate with Twilio

Knative Eventing

  • Hello World Eventing
  • Simple Delivery
  • Complex Delivery
  • Complex Delivery with reply
  • Broker and Trigger Delivery
  • Scheduled service
  • Event registry

Knative Eventing with Google Cloud

  • Cloud Pub/Sub triggered service
  • Cloud Storage triggered service
  • Integrate with Translation API
  • Integrate with Vision API
  • Image processing pipeline
  • BigQuery processing pipeline

Build

  • Tekton Pipelines

    • Hello World Tekton
    • Google Container Registry Build
    • Docker Hub Build
  • Knative Build (Deprecated)

    • Hello World Build
    • Docker Hub Build
    • Kaniko Build Template
    • Buildpacks Build Template

This is not an official Google product.