Helm ignores specified version and installs latest

9/23/2021

Me and my colleague have an issue, whenever I type

helm install mystuff-nginx ingress-nginx/ingress-nginx --version 3.26.0 

I have successfully deployed nginx in version 3.26.0, however when he runs the same command on his laptop just with different name mystuff-nginx-1 he installs it in the lastest version 4.0.1, and idea what's going on ? We have helm, gcloud and kubectl in the same versions, even redownloaded the binary.

and we know the version is available

MacBook-Pro-2% helm search repo -l ingress-nginx/ingress-nginx
ingress-nginx/ingress-nginx                  	4.0.2        	1.0.1      	Ingress controller for Kubernetes using NGINX a...
ingress-nginx/ingress-nginx                  	4.0.1        	1.0.0      	Ingress controller for Kubernetes using NGINX a...
ingress-nginx/ingress-nginx                  	3.37.0       	0.49.1     	Ingress controller for Kubernetes using NGINX a...
ingress-nginx/ingress-nginx                  	3.36.0       	0.49.0     	Ingress controller for Kubernetes using NGINX a...
ingress-nginx/ingress-nginx                  	3.35.0       	0.48.1     	Ingress controller for Kubernetes using NGINX a...
...
ingress-nginx/ingress-nginx                  	3.26.0       	0.44.0     	Ingress controller for Kubernetes using NGINX a...
-- CptDolphin
kubectl
kubernetes
kubernetes-helm

1 Answer

9/24/2021

According to Helm's documentation:

helm install [NAME] [CHART] [flags]

The version flag:

--version string               specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not specified, the latest version is used

So, you can try:

$ helm install nginx-ingress ingress-nginx/ingress-nginx --version "3.26.0"

helm list:

NAME         	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART               	APP VERSION
nginx-ingress	default  	1       	2021-09-24 09:44:54.261772858 -0300 -03	deployed	ingress-nginx-3.26.0	0.44.0     

I used the helm version v3.5.4 and a k3d cluster to test.

-- Emidio Neto
Source: StackOverflow