Skip to content
Latchkey

Helm "unable to build kubernetes objects from release manifest" in CI

Helm rendered the templates and then tried to turn the output into Kubernetes objects, and that step failed. The template logic ran - the produced YAML is not valid Kubernetes (malformed YAML, an unknown kind/apiVersion, or a field the schema rejects).

What this error means

helm install/upgrade fails with Error: unable to build kubernetes objects from release manifest: error validating "": ... or ... unable to decode "": ..., naming the offending kind or field. Deterministic for the same chart and values.

helm output
Error: INSTALLATION FAILED: unable to build kubernetes objects from release
manifest: error validating "": error validating data: ValidationError(Deployment.
spec): unknown field "replica" in io.k8s.api.apps.v1.DeploymentSpec

Common causes

Rendered YAML is schema-invalid

A template produced an unknown field, wrong type, or bad indentation (often from a misused value), so the manifest fails validation when Helm builds objects.

Unknown kind / apiVersion in the output

The chart renders a kind/apiVersion the cluster does not serve (a CRD not installed, or a removed API), so Helm cannot map it to an object.

How to fix it

Render and validate the manifest yourself

Template with your values and inspect (or lint) the exact output Helm is trying to build.

Terminal
helm template my-release ./chart -f values.yaml > /tmp/manifest.yaml
kubectl apply --dry-run=server -f /tmp/manifest.yaml

Fix the template or install the missing kind

  1. Correct the field/type the validation names (check kubectl explain <kind>.<path>).
  2. If it is a CRD kind, install the CRD before the release.
  3. Pin chart apiVersions to ones the cluster serves.

How to prevent it

  • Run helm template | kubectl apply --dry-run=server in CI before install.
  • Keep chart apiVersions current and install CRDs ahead of releases.
  • Lint rendered output, not just the templates, in the pipeline.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →