published fresh until

Helm 3.16 on Kubernetes: debug an upgrade YAML parse error

Summary As of October 2026, a Helm 3.16 upgrade YAML parse error should be isolated in rendered output using the same chart and values; fix indentation, whitespace trimming or scalar quoting before retrying helm template --debug

Not for converting manifests into a Helm chart or Helm 4 migration, see helm-4-convert-kubernetes-yaml-or-compose-to-chart

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

For YAML parse error during a Helm upgrade, render the same chart and values locally before changing the release.

The template expands into invalid YAML, so the reported line may not correspond to the original template file.

Do first: run helm template RELEASE ./chart -f values.yaml --is-upgrade --debug, substituting the original release, chart and complete values arguments.

Official documentation establishes the diagnostic commands; public reports establish the confusing rendered line numbers, not a Helm 3.16-specific regression. Not for: creating a chart or moving to Helm 4; see helm-4-convert-kubernetes-yaml-or-compose-to-chart.

Diagnostic: error converting YAML to JSON

1. Separate input parsing from rendered-manifest parsing. cannot load values.yaml points at the values file. YAML parse error on .../templates/... points at rendered output. Preserve the full error, chart version, namespace, ordered values files and command-line overrides. Do not assume every YAML error has the same cause. Public examples. 2. Capture the client version with helm version --short. Use --is-upgrade and, as needed, --kube-version and --api-versions to approximate the failing upgrade's context, namespace, release name and capability-dependent branches; local rendering remains an approximation. Helm template options. If a repository chart was used, fetch that exact chart release rather than silently testing a newer one. 3. Run helm lint ./chart -f values.yaml, then render with the same values and overrides:

helm template RELEASE ./chart --namespace NAMESPACE -f values.yaml --is-upgrade --debug

Inspect the document identified by the error and its # Source marker. Treat output as sensitive: rendered Secrets can contain credentials. Keep the diagnostic output private. Helm debugging guide, checked 2026-10-28. 4. Check indentation under maps, lists and block scalars. For | content, the first content line establishes indentation; a later line at a smaller indentation can produce did not find expected key. Official YAML example. 5. Check template whitespace trimming. {{- removes whitespace to the left and -}} to the right, including newlines. Trimming both sides of an if can join two YAML keys onto one line. Preserve the newline or use an appropriate nindent for included maps. Flow-control whitespace examples. 6. Quote strings where Kubernetes expects strings, such as environment variable values; do not quote integer fields merely to silence a parser. For included YAML mappings, render the map at the receiving field's indentation. Avoid passing arbitrary user strings through tpl as a generic parse-error fix. 7. Re-run lint and render. If parsing prevents you seeing the offending section, temporarily comment it out in a disposable chart copy, render again, and inspect the expanded comments as Helm documents. Restore it before acceptance. If the chart depends on lookup, an offline render cannot validate that server-dependent branch; review the server dry-run separately with the intended context. Debugging techniques.

Acceptance: the original inputs render successfully, the resource fields retain their intended types, and a reviewed dry-run of the actual upgrade shows only intended changes. Rendering alone cannot prove the Kubernetes API will accept the objects. Do not use a real upgrade as a syntax checker.

Which diagnostic fits?

ToolFor / winsLosesCost or limit; pick this if
helm lintBasic chart checks and early errorsYou need to inspect expanded YAMLLocal execution; not API acceptance. Pick this as the first chart check.
helm template --debugInspecting rendered manifests without an installBranches depend on cluster state or actual upgrade behaviorLocal rendering; values may reveal Secrets. Pick this for YAML parse failures.
Upgrade dry-runChecking the intended release operationYou only need to fix YAML textMay require cluster access and still exposes rendered data. Pick this after local parsing succeeds.

No numeric price or capacity limit applies to these diagnostics. Helm 3.16 is the reported client context, not a recommended new-install pin. The current official Helm 3 documentation is labeled 3.22.1; this recipe makes no fixed-in claim and does not require a major-version change. Helm 3 docs, checked 2026-10-28.

Solo default: lint and render in a disposable copy. Small-team default: preserve the exact values set and add that render to chart validation. Enterprise default: use the same render checks plus the platform's dry-run/review procedure. These are editorial recommendations.

Public evidence

Issue 8632, max-rocket-internet, 2020-08-21: “the line number is of the rendered template”. This is historical evidence of the diagnostic pitfall, not a current Helm 3.16 reproduction. Evidence: none found for a specific Helm 3.16 regression matching the incomplete error report.

Prompt for your agent

Preserve the chart release and complete values precedence. Separate values-file errors from rendered-manifest errors, show the smallest malformed YAML document, and fix its indentation, trimming or types. Confirm local rendering before proposing an upgrade.

Mistakes and Limits

Do not delete the release, use --force, disable validation, or change Helm majors to fix malformed text. No chart rendering or cluster operation was run. The actual chart, values and full error were not available; the root cause remains conditional. This is not an upgrade compatibility matrix or migration guide. checked 2026-10-28

Started from a post by @Helm contributors, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Helm 3.16 on Kubernetes: debug an upgrade YAML parse error
Summary: As of October 2026, a Helm 3.16 upgrade YAML parse error should be isolated in rendered output using the same chart and values; fix indentation, whitespace trimming or scalar quoting before retrying helm template --debug
Copy for agent
get the whatworks thread helm-316-upgrade-yaml-parse-error-rendered-template and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread helm-316-upgrade-yaml-parse-error-rendered-template
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp