liveBook · Manning

Kubernetes manifest

As explained in Platform Engineering on Kubernetes

A Kubernetes manifest is a declarative configuration document that describes Kubernetes resources and their desired state.

A Kubernetes manifest is a declarative configuration document describing resources and their desired state. For a service, it defines how its container is deployed into a Kubernetes cluster. Keep the manifest with the service source and Dockerfile so a service pipeline can verify and version the deployment configuration alongside the image it builds. section 3.4 section 3.4.2

Choose how to distribute the configuration according to who needs to install the service:

  • For a few teams and environments, distribute the YAML files without a packaging tool. section 3.4
  • When many installations need a versioned package, use a Helm Chart. The pipeline can version it with the binary and container image and publish it to a repository. section 3.4 section 3.4.2

Deployment is a separate concern. An environment repository records which services should be present; an environment pipeline reads that configuration and applies it to the target cluster. The service pipeline produces deployable artifacts but does not choose a specific environment for them. section 3.4 section 4.1.4

From YAML files to an environment

A simple environment repository holds Kubernetes YAML files, and its pipeline runs `kubectl apply -f *` against the configured cluster. If those files also live in service repositories, the copies can drift apart across environments. Alternatives include a parent Helm Chart with service dependencies or a helmfile whose declared releases are created with `helmfile sync`. section 4.1.4

Figure 3.6 The service source code repository needs to have all the configurations for the service pipeline to work.

The service repository layout places source, Dockerfile, and Helm Chart configuration together, showing what a pipeline needs to build and package a deployable service. section 3.4.2

Do not add Helm packaging merely because the pipeline can support it. Add that step when distributing manifests as packages solves a real installation or release problem. section 3.4.3

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains repository placement, packaging choices, and deployment workflows, but does not work through individual manifest fields.
Examples
Compares direct `kubectl apply -f *` with Helm dependencies and `helmfile sync` for environment configuration.
What it assumes
Assumes a Kubernetes target cluster and, for service pipelines, a repository containing source, image-build instructions, and deployment configuration.
What you can do after
Operate/configure it by keeping deployable YAML with a service and choosing direct application or packaging for the target environment.
How it connects
Connects manifests to container images, service pipelines, environment pipelines, Git repositories, and Helm Charts.

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 Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.