helm: Helm throws an error when packaging charts

$ helm version
Client: &version.Version{SemVer:"v2.3.0", GitCommit:"2342275b61e0539d259590975cfb78f23afcc1e3", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.3.0", GitCommit:"d83c245fc324117885ed83afc90ac74afed271b4", GitTreeState:"clean"}

Steps to reproduce the problem:

  • create a test chart
$ helm create test
  • test that what you wanted to create is there and change to that directory:
$ cd test && tree .
.
├── Chart.yaml
├── charts
├── templates
│   ├── NOTES.txt
│   ├── _helpers.tpl
│   ├── deployment.yaml
│   └── service.yaml
└── values.yaml
  • lint the chart:
$ helm lint .
==> Linting .
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, no failures
  • package the chart:
$ helm package .

Expected result: Chart gets packaged in a .tgz file and the command returns 0. ACTUAL RESULT: The .tgz file gets generated, but the command returns an error code:

$ helm package .
WARNING: Deprecated index file format. Try 'helm repo update'
Error: no API version specified
$ echo $?
1

Other steps taken

  • update the repo:
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "dp-stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
$ helm package .
WARNING: Deprecated index file format. Try 'helm repo update'
Error: no API version specified

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (11 by maintainers)

Most upvoted comments

More info This happened after the helm upgrade to the latest version.

I managed to fix this by:

  • uninstalling helm with brew uninstall kubernetes-helm
  • deleting the ~/.helm directory
  • reinstalling kubernetes-helm with brew which made it recreate all the directories.

So probably this should be fixed as a part of the upgrade process, or some documentation?

Running “helm serve .” fixed the issue for me.

Can you run helm serve, @ae6rt ? Does it give you any errors?

One possible reason for this error is that helm init was never run (only helm init --client-only is necessary. Another is that helm serve corrupted the index. And often just running it again will fix the index. As soon as it has successfully started up, you can CTRL-C it.