✦ For everyone, free.

Practical knowledge for real and everyday life

Home

Kubernetes Manifest Purpose

Kubernetes manifests define how applications run in clusters, specifying configurations and ensuring consistent, scalable deployments across environments.

Kubernetes Manifest Purpose is the reason manifests exist as the primary way of expressing intent to a Kubernetes cluster: to serve as a durable, version-controllable, human-authored description of desired state that can be submitted to the API server, diffed against prior versions, reviewed before being applied, and reapplied deterministically without depending on the specific sequence of imperative commands that originally produced a given piece of cluster state. A manifest is not a script and not a set of instructions to execute in order; it is a declaration of what should exist, which is precisely what makes it suitable as the artifact around which infrastructure-as-code practices for Kubernetes are built.


Manifests as Declarations, Not Commands

Describing an End State

A manifest describes the end state a resource should be in — three replicas of a given container image, a Service exposing a specific port, a ConfigMap containing specific key-value data — without describing the sequence of API calls needed to get there; that translation from declared end state to actual cluster changes is the responsibility of the API server's admission and defaulting logic and, ultimately, whichever controller reconciles the object's spec.

Idempotence as a Direct Consequence

Because a manifest declares an end state rather than a command, submitting the same manifest multiple times produces the same result each time — the cluster converges to the described state and further identical submissions are effectively no-ops — which is precisely the property that makes manifests safe to reapply in automated pipelines without needing to track whether a prior application already succeeded.


Manifests as a Durable Record

Version Control as the Natural Home for Manifests

Because manifests are plain text (typically YAML), they fit naturally into version control systems, giving teams a reviewable history of exactly how a cluster's desired state has changed over time, who changed it, and why, in exactly the same way source code changes are tracked, extending familiar software engineering practices to infrastructure configuration.

Manifests as the Basis for GitOps

This durability and reviewability is the foundation GitOps workflows are built on: a Git repository of manifests is treated as the single source of truth for desired cluster state, with automated tooling continuously reconciling the live cluster to match whatever is committed, turning a pull request merge into the trigger for an actual infrastructure change rather than requiring a separate manual deployment step.


Manifests as a Boundary Between Human Intent and System Behavior

Manifests Describe Spec, Not Status

Consistent with the broader spec/status object model, manifests are conventionally understood to describe only the spec portion of an object (plus identifying metadata); status fields are never meaningfully authored in a manifest, since they represent observed state a controller reports, not something a client can declare into existence by writing it down.

Separating What From How

By keeping manifests focused on declaring what should exist, the actual mechanics of how that state is achieved — scheduling decisions, container startup sequencing, retry behavior on failure — remain entirely the responsibility of the cluster's controllers and the kubelet, meaning manifest authors do not need deep operational knowledge of the reconciliation machinery to describe correct desired state.


Manifests Across the Tooling Ecosystem

A Common Interchange Format

Because manifests are simply YAML or JSON conforming to the API's object schema, they serve as a common interchange format across an enormous range of tooling — templating engines, package managers, CI/CD pipelines, policy scanners — all of which can produce, consume, or transform manifests without needing bespoke integration with each other, since they all ultimately agree on the same underlying object model the manifest represents.

Manifests as Input to Multiple Application Paths

The same manifest content can be applied through kubectl apply, a GitOps controller, a CI/CD pipeline's deployment step, or a programmatic client, illustrating that a manifest's purpose is fundamentally about representing desired state portably, independent of which specific mechanism eventually submits it to the API server.