helm error "Error: This command needs 2 arguments: release name, chart path"
Asked Answered
T

8

11

I am getting an error in my kubernetes cluster while upgrading my install of kamus

$ helm --debug upgrade --install soluto/kamus

[debug] Created tunnel using local port: '64252'
[debug] SERVER: "127.0.0.1:64252"
Error: This command needs 2 arguments: release name, chart path

Using helm version 2.13.1

This error is also known to be cause by not correctly using --set correctly or as intended.

As an example when upgrading my ingress-nginx/ingress-nginx installing as such:

 --set "controller.service.annotations.service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz,"controller.service.annotations.service\.beta\.kubernetes\.io/azure-dns-label-name"=$DNS_LABEL

This caused the same error as listed above.

When I removed the quotations it worked as intended.

 --set controller.service.annotations.service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path=/healthz,controller.service.annotations.service\.beta\.kubernetes\.io/azure-dns-label-name=$DNS_LABEL

The error in this case had nothing to do with not correctly setting a release name and or chart. More explanation of --set issues and solutions are below.

Terr answered 27/3, 2019 at 0:25 Comment(0)
T
12

Helm upgrade command requires release name and chart path. In your case, you missed release name.

helm upgrade [RELEASE] [CHART] [flags]

helm --debug upgrade --install kamus soluto/kamus should work.

Turro answered 27/3, 2019 at 8:10 Comment(1)
If the helm chart has embeded dependencies then the helm upgrade complains Error: found in Chart.yaml, but missing in charts/ directory: another-simple-chart helm.go:81: [debug] found in Chart.yaml, but missing in charts/ directory: another-simple-chart. Is there there a way that the dependencies get updated by the upgrade cmd. I am using helm-upgrade-from-source in my tekton pipeline. helm.sh/helm/v3/pkg/action.CheckDependenciesPointless
F
12

I encountered this error when I do --set key value instead of --set key=value. The cause was as stupid as the error message.

Footing answered 29/9, 2021 at 10:36 Comment(3)
Had same issue with: helm upgrade --install mychartname myrepo/myrelease --set x y Worked with: helm upgrade --install mychartname myrepo/myrelease --set x=yChristchurch
I made the stupid mistake of not adding --set for each key=value. I can't believe helm is this bad with error message. Super frustratingArchaean
I had the error when one of my gitlab CI vars (used for one of the options in my Helm call) was undefined.Larondalarosa
W
3

I had similar error too. Turned out that the problem was the values that I've been passing as argument. So take this example:

helm upgrade my-release ./mychart --set mypropert.name=${MY_PROP}

If the value of ${MY_PROP} has some whitespace or dash - or some other strange characters you get that misleading error. So ensure you enclose your arguments with single-quote:

helm upgrade my-release ./mychart --set 'mypropert.name=${MY_PROP}'
Windpollinated answered 20/3, 2023 at 0:13 Comment(1)
Thanks man, it resolved my problem. But in my case taking 'single quotes' was just taking {MY_PROP} as the value itself. "Double quotes" worked for me. As someone said, it is pretty stupid bug with even more stupid error message.Endorsed
P
2

Helm upgrade requires both a release name and the chart it references. From the documentation:

Usage: helm upgrade [RELEASE] [CHART] [flags]

According to the documentation for the --install flag, the command you referenced seems like it should work, but it may be due to differing Helm versions.

helm install soluto/kamus works for me.

Pleuro answered 27/3, 2019 at 1:44 Comment(0)
S
1

I ran into this error (too) many times.

The first thing that should come to your mind is typos in the command.

For example:

  1. If you're passing location of values.yaml with -f <path-to-values.yaml> you should make sure its in the relevant order related to flags that were passed.
  2. If you're passing inline values with the --set flag you should make sure that there are no whitespace in the variable assignment like in this case: --set someVar= $SomeValue.

Run helm help upgrade or helm help install to get more information about each commands.

Scarify answered 10/3, 2021 at 16:53 Comment(1)
3. If you're passing inline values with --set flag make sure there are no extra whitespace between --set flags. Example: yaml helm upgrade --username usr --password pass \ releasename \ repo.url/charts/mychart \ --install \ --debug \ --version v1.0 \ --set url=app.com \ no extra whitespace here! --set pullsecret=123Henriques
B
0

May be this detailed information will be helpful for someone new to this !

1. My helm files are here (I made changes in values.yaml to upgrade):

controlplane $ pwd
/root/existing2helm
controlplane $ ls
Chart.yaml  charts  templates  values.yaml

2. Listing current releases

controlplane $ helm list 
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
newdeploybyhelm default         2               2021-02-01 00:39:11.596751325 +0000 UTC deployed        existing2helm-0.1.0     1.16.0     

3. Finally executing the upgrade command

controlplane $ helm upgrade newdeploybyhelm /root/existing2helm
Release "newdeploybyhelm" has been upgraded. Happy Helming!
NAME: newdeploybyhelm
LAST DEPLOYED: Mon Feb  1 00:48:30 2021
NAMESPACE: default
STATUS: deployed
Bayly answered 1/2, 2021 at 0:59 Comment(0)
R
0

I got this error when I add first line parameters

--install --create-namespace --wait --atomic

to the end of the parameter list again. You may want to check duplicate parameters, or duplicate --install command if you are using a parameter builder.

Rozellarozelle answered 23/8, 2022 at 23:39 Comment(0)
T
0

for me it was extra spaces with helm upgrade.

If you are using multi line command with backslash ( \ ), Ensure there are no spaces after the backslash.

Torino answered 12/6, 2024 at 9:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.