Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Servers, nginx and Docker

helm_release or helm install says Chart.yaml file is missing

Your error

Error: could not download chart: Chart.yaml file is missing3 more lines it can show

Fix it fast

Most common cause, 1 of 3

A folder or file with the chart's name sits in the working directory

Rename the clashing folder (for example ./keycloak to ./keycloak-stack) or run Terraform from another directory.

Fix
resource "helm_release" "keycloak" {
  name       = "keycloak"
  repository = "oci://registry-1.docker.io/bitnamicharts"
  chart      = "keycloak"
}
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

Chart.yaml file is missing means Helm loaded a local directory, not the repository chart. Helm 3, which the Terraform helm provider 3.3 embeds, checks the working directory first, so a folder named keycloak beats repository. Rename that folder or use an oci:// repository. Applies to Helm 3.22, Helm 4.3 and provider 3.3.

  • Applies to Helm 4.3.2, Helm 3.22.1, Terraform helm provider 3.3.0 (built on Helm 3.20.2)
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

In the directory where terraform apply or helm install runs, look for anything that has exactly the chart's name, then look for Chart.yaml inside it. A match without Chart.yaml is cause 1. No match, but you pass a path to chart, points to cause 2 or 3.

Run this first
ls -ld ./keycloak
ls ./keycloak/Chart.yaml

Then find the line you see in this list and open its fix:

  1. 1A folder or file with the chart's name sits in the working directoryls shows ./keycloak (a Terraform module folder, a values folder, a cloned repo), and the Helm 3.19+ command line prints a warning that the repository url was ignored
  2. 2The chart path stops one level above or below Chart.yamlchart is set to a path such as ./charts or ./charts/keycloak/templates, and ls of that path shows no Chart.yaml
  3. 3A negation line in .helmignore hides Chart.yamlThe chart folder does contain Chart.yaml, and its .helmignore has a line that starts with ! (for example *.md followed by !README.md)

What does the error look like?

  • Error: could not download chart: Chart.yaml file is missing
  • Unable to load chart /path/to/keycloak: Chart.yaml file is missing
  • Error: INSTALLATION FAILED: Chart.yaml file is missing
  • local chart found in current working directory. repository url ignored

Cause 1 of 3

A folder or file with the chart's name sits in the working directory

You seels shows ./keycloak (a Terraform module folder, a values folder, a cloned repo), and the Helm 3.19+ command line prints a warning that the repository url was ignored

Check

Chart.yaml file is missing appears here because Helm 3 resolves the chart name against the current directory before it contacts any repository. The source keeps this order for backwards compatibility. The Terraform helm provider 3.3.0 calls the same Helm 3.20.2 code, so repository in helm_release does not help while the folder exists.

Check
find . -maxdepth 1 -name keycloak

Fix

Rename the clashing folder (for example ./keycloak to ./keycloak-stack) or run Terraform from another directory. An oci:// repository also avoids the clash, because the provider turns the chart into a full oci:// reference that is never a local path. On the command line, Helm 4 skips the local lookup whenever --repo is passed.

Fix
resource "helm_release" "keycloak" {
  name       = "keycloak"
  repository = "oci://registry-1.docker.io/bitnamicharts"
  chart      = "keycloak"
}

Verify

terraform plan and apply get past the chart download, and helm list shows the keycloak release with its chart version.

Verify
helm list -A | grep keycloak

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 2 of 3

The chart path stops one level above or below Chart.yaml

You seechart is set to a path such as ./charts or ./charts/keycloak/templates, and ls of that path shows no Chart.yaml

Check

Helm's loader reads every file under the given directory and stops with Chart.yaml file is missing when none of them is a top-level Chart.yaml. A path one level too high or too low is enough to trigger it.

Check
ls charts/keycloak/Chart.yaml

Fix

Point chart at the directory that holds Chart.yaml. Inside a Terraform module, build the path from path.module so it does not depend on where Terraform is started.

Fix
resource "helm_release" "app" {
  name  = "app"
  chart = "${path.module}/charts/app"
}

Verify

helm lint on the same path reports 0 chart(s) failed, and the Terraform run loads the chart.

Verify
helm lint charts/app

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 3 of 3

A negation line in .helmignore hides Chart.yaml

You seeThe chart folder does contain Chart.yaml, and its .helmignore has a line that starts with ! (for example *.md followed by !README.md)

Check

When Chart.yaml exists but Helm still reports it missing for a local chart, look at .helmignore. Helm applies that file while it loads a chart directory for install, upgrade and template. An open Helm issue shows a ! pattern making lint and install skip Chart.yaml, and a maintainer confirms negation does not behave like .gitignore.

Check
grep -n '^!' charts/app/.helmignore

Fix

Delete the ! lines and exclude the unwanted files one by one instead. Keep the file in the chart root next to Chart.yaml, the only place Helm reads it.

Fix
# charts/app/.helmignore, without negation
CHANGELOG.md
docs/
.git

Verify

helm lint passes, and helm template renders the manifests without the missing-file error.

Verify
helm lint charts/app && helm template app charts/app > /dev/null

Confirmed by github.com

Did this fix it?

How do I stop it coming back?

  • Do not name a Terraform module folder or a values folder after a chart that the same configuration installs.
  • Prefer oci:// repositories for charts that are published as OCI artifacts, such as the Bitnami catalog.
  • Run helm lint on every local chart in CI, so a bad path or .helmignore change fails before terraform apply.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.