Kubernetes Spec Compare: Spot Breaking API Changes

5/28/20262 min readBy RM
kubernetesk8sapiupgradedevops

Kubernetes upgrades are where silent API changes show up. Fields move, defaults shift, and deprecations become removals. Compare OpenAPI specs before you roll the control plane forward, not after workloads fail to apply.

Use the Kubernetes Spec Compare tool to diff API objects between versions.

Quick steps

  1. Pick two Kubernetes versions (source and target).
  2. Choose a resource type: Deployment, Pod, Service, Ingress, etc.
  3. Review added, removed, and modified fields in the spec diff.
  4. Update manifests and CI checks based on what changed.

What to look for

Change typeAction
Removed fieldDelete from manifests; find replacement in docs
New required fieldAdd to templates before upgrade
Deprecated fieldPlan migration; it may disappear in the next minor
Default behavior changeRe-read release notes. Even “unchanged” YAML can behave differently

Example workflow

Compare Deployment between v1.28 and v1.30:

  1. Note fields only present in the newer spec (new knobs you might want).
  2. Note fields marked deprecated or absent in the newer spec.
  3. Open a known-good Deployment manifest and patch it, or convert JSON/YAML with JSON to YAML / YAML to JSON while editing.
  4. Validate edited YAML with YAML Validator before apply.

Repeat for every resource type you actually deploy, not just Deployments.

Common mistakes

  • Assuming patch upgrades are always safe. Minor versions can deprecate beta APIs you still use.
  • Ignoring deprecation warnings. They appear in release notes and often in kubectl warnings before hard failure.
  • Checking one resource only. Ingress, HPAs, PDBs, and CRDs (outside this tool’s core scope) all matter. CRDs need separate vendor docs.

Verification checklist

  • Review all core resources your cluster templates use.
  • Compare a production-like manifest against the target version spec.
  • Document field changes in your upgrade runbook.
  • Run dry-run applies (kubectl apply --dry-run=server) in a staging cluster when possible.

FAQ

Does it include CRDs?

No. The tool focuses on core Kubernetes API objects from official OpenAPI specs. Custom resources need vendor-specific comparison.

Where does the data come from?

Official Kubernetes OpenAPI / documentation sources for the selected versions, not live cluster state.

Is cluster data uploaded?

No. Comparisons run in your browser.

How does this relate to YAML validators?

YAML Validator checks syntax. Spec compare checks whether fields exist and changed between K8s versions. Use both.

Related tools