Skip to content
Latchkey

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

Helm rendered the chart and sent the manifests to the API server for validation (dry-run/decode), and the server rejected them. The trailing text names the offending field, kind, or missing CRD.

What this error means

helm install/upgrade fails with "Error: unable to build kubernetes objects from release manifest:" followed by a validation message such as an unknown field, a missing CRD, or an invalid value.

helm
Error: unable to build kubernetes objects from release manifest: error validating
"": error validating data: ValidationError(Deployment.spec.template.spec.containers[0]):
unknown field "imagePullPolict" in io.k8s.api.core.v1.Container

Common causes

A typo or wrong field in a template

A misspelled key (here imagePullPolict) or a field that does not exist on that kind fails server-side validation.

A CRD the manifest references is not installed

A manifest of a custom kind whose CRD is absent cannot be decoded, so Helm cannot build the object.

How to fix it

Render and validate locally first

  1. Render the chart with helm template to see the exact YAML.
  2. Validate it against the cluster schema to surface the field error.
  3. Fix the template field or value, then redeploy.
Terminal
helm template my-app ./chart -n prod | kubectl apply --dry-run=server -f -

Install required CRDs before the chart

If a custom kind is referenced, install its CRDs first (the operator chart or a crds/ directory) so the API server can decode the manifest.

Terminal
kubectl apply -f https://example.com/crds.yaml
helm upgrade --install my-app ./chart -n prod

How to prevent it

  • Run helm template | kubectl apply --dry-run=server in CI before deploying.
  • Lint templates so typos in field names are caught early.
  • Install CRDs before charts that depend on them.

Related guides

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