Chapter 2. Serving
Even with serverless architectures, the ability to handle and respond to HTTP requests is an important concept. Before you write some code and have events trigger a function, you need a place for the code to run.
This chapter examines Knative’s Serving component. You will learn how Knative Serving manages the deployment and serving of applications and functions. Serving lets you easily deploy a prebuilt image to the underlying Kubernetes cluster. (In Chapter 3, you will see that Knative Build can help build your images for you to run in the Serving component.) Knative Serving maintains point-in-time snapshots, provides automatic scaling (both up and down to zero), and handles the necessary routing and network programming.
The Serving module defines a specific set of objects to control all this functionality: Revision, Configuration, Route, and Service. Knative implements these objects in Kubernetes as Custom Resource Definitions (CRDs). Figure 2-1 shows the relationship between all the Serving components. The following sections will explore each in detail.
Configurations and Revisions
Configurations are a great place to start when working with Knative Serving. A Configuration is where you define your desired state for a deployment. At a minimum, this includes a Configuration name and a reference to the container ...
Get Getting Started with Knative now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.