Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

helm upgrade error "Error: This command needs 2 arguments: release name, chart path"

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.

like image 780
user674669 Avatar asked Mar 27 '19 00:03

user674669


4 Answers

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.

like image 71
edbighead Avatar answered Oct 22 '22 11:10

edbighead


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

like image 20
dz902 Avatar answered Oct 22 '22 13:10

dz902


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.

like image 28
Jared Rewerts Avatar answered Oct 22 '22 13:10

Jared Rewerts


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.

like image 21
RtmY Avatar answered Oct 22 '22 11:10

RtmY