How to install a specific Chart version How to install a specific Chart version kubernetes kubernetes

How to install a specific Chart version


I see in the helm install code:

# help provides possible cli installation argumentshelp () {  echo "Accepted cli arguments are:"  echo -e "\t[--help|-h ] ->> prints this help"  echo -e "\t[--version|-v <desired_version>] . When not defined it defaults to latest"  echo -e "\te.g. --version v2.4.0  or -v latest"}

So just in case, do try with: --version v6.7.4 instead of --version 6.7.4.


I think your command is wrong:

helm install -f stable/prometheus/values.yaml prometheus --name stable/prometheus --namespace prometheus --version 6.7.4

Helm install command is:

helm install [CHART] [flags]

So in your case this should be:

helm install prometheus stable/prometheus -f stable/prometheus/values.yaml  --namespace prometheus

-- version is used for chart versions:

  --version string           Specify the exact chart version to use. If this is not specified, the latest version is used

Above command will install Prometheus version that is specified in values.yaml under tag but read this: https://github.com/helm/charts/tree/master/stable/prometheus for full list of parameters.


I didn't see an accepted answer and of course arrived here via Google and Reddit, so posting here.

Confirmed working:

 helm install argocd argo/argo-cd --version="1.6.2" -f argocd-helm-values.yaml -n argocd... helm list --all-namespacesNAME    NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSIONargocd  argocd      1           2020-08-22 16:35:37.516098 +0700 +07    deployed    argo-cd-1.6.2   1.3.6

It seems the placement of --version matters. Placing it after the -n (namespace) caused an error. However placing it before/after the -f worked fine.

Quotes didn't matter, both the commands below worked fine:

 helm install argocd argo/argo-cd -f argocd-helm-values.yaml --version=1.6.2 -n argocd helm install argocd argo/argo-cd --version="1.6.2" -f argocd-helm-values.yaml -n argocd

Finally, it seems that the equal sign is optional. Both the commands below also worked:

 helm install argocd argo/argo-cd -f argocd-helm-values.yaml --version=1.6.2 -n argocd helm install argocd argo/argo-cd -f argocd-helm-values.yaml --version 1.6.2 -n argocd

TL;DR

helm install <RELEASE_NAME> <REPO>/<CHART> --version <VERSION>eg.helm install my_release repo/app --version 1.0.0