liveBook · Manning

Kubernetes manifest

As explained in Google Anthos in Action

A Kubernetes manifest is a structured configuration document that declares one or more Kubernetes resources and their desired settings.

A Kubernetes manifest is a YAML configuration document that declares an application's desired state, potentially combining resources such as a namespace, Deployment, and Service. Applying one file lets Kubernetes create the resources and record the last applied configuration, making deployment changes easier to manage and track. section 3.2.4

A manifest coordinates several deployment responsibilities:

  • Defines workload settings, including the container image, replica count, labels, selectors, and Pod template. section 15.4.3
  • Groups related resources in one declarative artifact instead of requiring separate imperative commands. section 3.2.4
  • Captures migration-specific configuration alongside generated Docker images, persistent volumes, and custom resource definitions when produced by Migrate for Anthos. section 15.3.2 section 15.4.3

Applying a generated deployment manifest

A Migrate for Anthos workflow generates deployment_spec.yaml containing a Deployment with one replica and a migrated container image. After installing the runtime, apply it with `kubectl apply -f deployment_spec.yaml`; Kubernetes creates the workload, and `kubectl get pods` can confirm that the Pod is running. A separate Service manifest can expose the workload through a LoadBalancer.

Prefer manifests for repeatable deployments and configuration tracking. Imperative commands can create the same result quickly, but they may not expose every resource option; any emergency changes should be recorded back in the declarative manifest. section 3.2.4

Figure 15.2 Anthos Migrate: From virtual machines to containers
15-02

Use the migration architecture figure to see how deployment YAML moves application configuration and persistent storage from a VM into Kubernetes-managed components. section 15.3.2

How Google Anthos in Action covers it

How deep it goes
Explains multi-resource files, applied configuration tracking, workload fields, and the limits of imperative commands.
Examples
Uses an NGINX multi-resource YAML example and a Migrate for Anthos Deployment, Pod, and LoadBalancer Service.
What it assumes
Assumes familiarity with Kubernetes cluster components and resource management rather than teaching cluster architecture from zero.
What you can do after
Apply it via kubectl, inspect resulting Pods, and expose the workload with a Kubernetes Service.
How it connects
Connects manifests to desired state, kubectl apply, Deployments, Services, namespaces, Docker images, and persistent volumes.

Also explained in

Compare how 10 books explain Kubernetes manifest →

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.