liveBook · Manning

Containers as a service

As explained in Platform Engineering on Kubernetes

A container-as-a-service interface is an application-facing interface for running containers without requiring direct management of the underlying orchestration system.

Containers as a service gives application teams a simplified interface for running containers on demand without directly managing Kubernetes resources. Knative Serving provides this model through higher-level abstractions over Kubernetes. section 8.2 section 8.2.1

A Knative Service manages the application-facing workflow:

  • Define a container image and configuration in a Knative Service resource. section 8.2.1
  • Let Knative create and track the underlying services, deployments, ReplicaSets, revisions, and versions. section 8.2 section 8.2.1
  • Use demand-based autoscaling, including scaling unused workloads down to zero replicas. section 8.2 section 8.2.1
  • Expose the service through a stable endpoint while supporting advanced traffic handling and multiple simultaneous revisions. section 8.2

Notification service

A Knative Service can deploy the Conference application's notification container with an image and Kafka URL, then expose an endpoint that can be queried with curl. The resulting response reports the service name, pod details, source, and version. section 8.2.1

Listing 8.1 Knative Service definition
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: notifications-service                           #1
spec:
  template:
    spec:
      containers:
        - image: salaboy/notifications-service:v1.0.0   #2
          Env:                                          #3
          - name: KAFKA_URL
            value: <URL>

Use the manifest to inspect the minimal Knative Service contract: API version, resource kind, service name, container image, and environment configuration. section 8.2.1

How Platform Engineering on Kubernetes covers it

How deep it goes
Defines resources, lifecycle, revisions, traffic, and autoscaling, but defers detailed explanations of Knative components and internals.
Examples
Uses a Conference notification service, a Knative manifest, kubectl application, curl request, and reported service metadata.
What it assumes
Assumes a Kubernetes cluster and Knative Serving installation, with a step-by-step KinD deployment path available.
What you can do after
Operate containerized services through Knative Service resources with demand-based scaling, endpoints, revisions, and traffic controls.
How it connects
Connects Kubernetes, autoscaling, serverless computing, release strategies, traffic management, and functions-as-a-service.

Also explained in

Compare how 2 books explain containers as a service →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.