Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Declarative Configuration

Direct answer

Declarative configuration describes what the system should look like, such as Kubernetes manifests or Terraform files, rather than the steps to get there, which makes GitOps reconciliation possible.

When to use this

Use this when describing systems declaratively.

First 30 seconds

1. Configuration is declarative (manifests, Kustomize, Helm values).

2. Render and validate in CI.

3. Avoid imperative scripts in pipelines.

4. Pin chart versions.

5. Diff before merge.

Operational verification

declarative files → render → validate

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
GitOps reconciliation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformGitOps reconciliation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior. · Git
Key commandgit diff --check
Scope / prerequisiteUse this when describing systems declaratively.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Command read-back and what it shows Verify boundary

git diff --check is the bounded verification surface selected for GitOps → Declarative Configuration. A known-good result is the intended declarative files are committed to the approved revision, the controller observes that same revision, rendered objects match expectation and managed resources reach their defined ready state. Treat uncommitted or unexpected desired changes remain, controller revision lags/diverges, render/apply errors occur, or the observed revision is current while resources remain unhealthy as broken/suspicious. git diff --check shows local patch whitespace/error checks for the selected working tree, but it does not show controller reconciliation, admission success or resource health.

Step 2 Observation-driven branch and next-check logic Narrow the fault

For a failing GitOps → Declarative Configuration case, freeze scope first: target/object, desired revision or request, and failure time. Inspect git diff --check. Branch on evidence rather than labels: if local desired files differ unexpectedly from HEAD, resolve authoring state first; if repository state is correct but controller observes another revision, inspect source/ref synchronization; if revision matches but resources are not ready, move to render/apply errors and resource conditions.

Step 3 Common mistakes Narrow the fault
  • Imperative scripts mixed into declarative repos.
Key points
  • Declarative config describes the end state.
  • It enables reconciliation by controllers.
  • Examples: Kubernetes manifests, Terraform.
Key checks
  • kubectl diff -k <path> — declarative diff
  • kustomize build <path> | kubeconform -strict — validate manifests
  • helm template <chart> -f values.yaml — render Helm
ReferenceHow it works1 section · depth on demand

How it works

In GitOps → Declarative Configuration, effective state is split across declarative source files, the committed desired revision, generated/rendered manifests and the reconciliation object that maps repository intent to managed resources. GitOps separates authoring from reconciliation: repository state declares intent, a controller observes a revision and renders or applies objects, and managed-resource status reports whether the observed generation has converged. Branch protection, renderer versions, overlays, secret references, controller credentials and cluster/API reachability are separate things to check. This matters because a clean local diff shows only the working tree matches HEAD, not that HEAD is the approved revision or that a controller has reconciled it.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Declarative configuration describes what the end result should be — "3 replicas of web:1.4", "VLAN 120 named users" — and leaves it to a tool to work out the steps. It contrasts with imperative scripts that list commands to run.

DeclarativeImperative
replicas: 3kubectl scale --replicas=3
Terraform resource blockSeries of API calls
Resource module state: replacedSending CLI lines

Declarative definitions are easier to diff, review and reconcile, and they double as documentation of the current design.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docGitOps reconciliation current

Authoritative/upstream documentation reviewed for bounded claims in GitOps > Declarative Configuration. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://opengitops.dev/ · confidence 94%
Confirmation

Confirm action

Continue?