liveBook · Manning

Knative Revision

As explained in Google Anthos in Action

A Knative Revision is an immutable snapshot of a workload's container version and configuration that defines a deployable serving version.

A Knative Revision is an immutable snapshot of a workload’s container version and configuration. It defines the deployable version actually served to users. section 9.3.2

Knative Service updates create new revisions, while Configuration changes also trigger revision creation. This preserves deployable versions instead of modifying an existing snapshot. section 9.3.2

Revisions participate in Knative Serving through related resources:

  • A Knative Service defines the container version and traffic rules. section 9.3.2
  • A Configuration separates the application container from its desired configuration and produces revisions when modified. section 9.3.2
  • A Route maps endpoints to one or more revisions, allowing application versions to receive managed traffic. section 9.3.2 section 9.4

Deploying a Python revision

Applying a Knative Service containing a container image and TARGET environment variable creates a Configuration, Revision, Route, and supporting Pods. The resulting revision can be inspected with kubectl and reached through the generated service URL. section 9.3.6

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
 name: helloworld
 namespace: default
spec:
 template:
   spec:
     containers:
       - image: docker.io/{username}/helloworld
         env:
           - name: TARGET
             value: "Python Sample v1"

The manifest shows the container image and environment configuration that become part of the deployable workload snapshot. section 9.3.2

traffic:
 - tag: current
   revisionName: helloworld-v1
   percent: 95%
 - tag: candidate
   revisionName: helloworld-v2
   percent: 5%
 - tag: latest
   latestRevision: true
   percent: 0

The traffic specification demonstrates how named revisions can receive different traffic percentages while another revision remains available. section 9.3.2

How Google Anthos in Action covers it

How deep it goes
Explains contents, immutability, creation triggers, resource relationships, and deployment use without descending into implementation internals.
Examples
Uses Hello World and Python container deployments, YAML manifests, kubectl inspection, generated URLs, and curl requests.
What it assumes
Assumes a containerized application and an available Knative deployment, while introducing the generated Serving resources.
What you can do after
Operate/configure Knative workloads by applying a Service, inspecting generated revisions, and directing traffic between versions.
How it connects
Connects revisions to Knative Service, Configuration, Route, Kubernetes, and traffic management.

Also explained in

Compare how 2 books explain Knative Revision →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.