liveBook · Manning

Serverless computing

As explained in Platform Engineering on Kubernetes

Serverless computing is an execution model in which the provider manages server infrastructure and applications run with capacity allocated on demand.

Serverless computing runs workloads on demand while the platform manages infrastructure capacity. In Kubernetes, Knative Serving supplies higher-level abstractions for containers-as-a-service and functions-as-a-service workflows. section 8.2

Knative Services simplify deployment by generating and tracking Kubernetes resources and versions. Its autoscaler responds to demand, including scaling inactive workloads down to zero replicas. section 8.2 section 8.2.1

A serverless platform built with Knative can provide:

  • A simplified container contract resembling Google Cloud Run, AWS App Runner, and Azure Container Apps. section 8.2.1
  • Demand-based autoscaling managed by the platform rather than by each application team. section 8.2 section 8.2.1
  • Traffic management and multiple simultaneously available service versions for release strategies. section 8.2

Deploying a notification service

Apply a Knative Service resource containing the notification container image, then inspect it with kubectl get ksvc. The resulting URL can be called with curl to reach the on-demand service and inspect its response. 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 Knative Service definition to see the container image and environment configuration that drive the generated workload. section 8.2.1

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains Knative Services, autoscaling, scale-to-zero, resource generation, and traffic management, while deferring component internals.
Examples
Demonstrates a notification service manifest, kubectl inspection, generated URLs, and curl-based endpoint interaction.
What it assumes
Assumes familiarity with Kubernetes resources and kubectl while presenting a simplified interface that hides much Kubernetes complexity.
What you can do after
Operate/configure a Knative Service, inspect its generated URL, and expose an application that scales with demand.
How it connects
Connects serverless computing with Kubernetes, autoscaling, containers-as-a-service, functions-as-a-service, and release strategies.

Also explained in

Compare how 9 books explain serverless computing →

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.