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.
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.DeploymentSpecCommon 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.
helm template my-release ./chart -f values.yaml > /tmp/manifest.yaml
kubectl apply --dry-run=server -f /tmp/manifest.yamlFix the template or install the missing kind
- Correct the field/type the validation names (check
kubectl explain <kind>.<path>). - If it is a CRD kind, install the CRD before the release.
- Pin chart
apiVersions to ones the cluster serves.
How to prevent it
- Run
helm template | kubectl apply --dry-run=serverin CI before install. - Keep chart apiVersions current and install CRDs ahead of releases.
- Lint rendered output, not just the templates, in the pipeline.