如何安装特定的图表版本

Mas*_*rat 14 kubernetes kubernetes-helm

我正在尝试安装以前版本的Prometheus,即版本6.7.4:

helm install -f stable/prometheus/values.yaml prometheus --name stable/prometheus --namespace prometheus --version 6.7.4
Run Code Online (Sandbox Code Playgroud)

但是它会安装最新版本,prometheus-6.8.0:

$ helm ls
NAME        REVISION    UPDATED                     STATUS      CHART               NAMESPACE 
prometheus  1           Fri Jul  6 01:46:42 2018    DEPLOYED    prometheus-6.8.0    prometheus
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

tr5*_*r53 12

我认为你的命令是错误的:

helm install -f stable/prometheus/values.yaml prometheus --name stable/prometheus --namespace prometheus --version 6.7.4
Run Code Online (Sandbox Code Playgroud)

Helm 安装命令是:

helm install [CHART] [flags]
Run Code Online (Sandbox Code Playgroud)

所以在你的情况下,这应该是:

helm install prometheus stable/prometheus -f stable/prometheus/values.yaml  --namespace prometheus
Run Code Online (Sandbox Code Playgroud)

-- version 用于图表版本:

  --version string           Specify the exact chart version to use. If this is not specified, the latest version is used
Run Code Online (Sandbox Code Playgroud)

上面的命令将安装在 values.yaml 下指定的 Prometheus 版本,tag但请阅读:https://github.com/helm/charts/tree/master/stable/prometheus完整的参数列表。


Von*_*onC 8

我在helm install代码中看到:

# help provides possible cli installation arguments
help () {
  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"
}
Run Code Online (Sandbox Code Playgroud)

因此,以防万一,请尝试使用:--version v6.7.4代替--version 6.7.4

  • 这超出了安装头盔本身的脚本。问题是关于安装头盔图的特定版本。 (3认同)

Jai*_*ani 7

我没有看到接受的答案,当然是通过 Google 和 Reddit 到达这里的,所以在这里发帖。

确认工作:

? helm install argocd argo/argo-cd --version="1.6.2" -f argocd-helm-values.yaml -n argocd
...
? helm list --all-namespaces
NAME    NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION
argocd  argocd      1           2020-08-22 16:35:37.516098 +0700 +07    deployed    argo-cd-1.6.2   1.3.6
Run Code Online (Sandbox Code Playgroud)

看来安置--version事项。将它放在-n(命名空间)之后会导致错误。但是将它放在-f工作正常之前/之后。

引号无关紧要,以下两个命令都可以正常工作:

? 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
Run Code Online (Sandbox Code Playgroud)

最后,等号似乎是可选的。下面的两个命令也有效:

? 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
Run Code Online (Sandbox Code Playgroud)

TL; 博士

helm install <RELEASE_NAME> <REPO>/<CHART> --version <VERSION>

eg.
helm install my_release repo/app --version 1.0.0
Run Code Online (Sandbox Code Playgroud)


小智 5

--version "0.15.0"在双引号中使用ie 版本号。它对我有用。


小智 5

下面使用Helm-3 ( Cheers )为我工作:

第1步 : helm search repo mongo -l

(假设你已经完成了helm repo add bitnami https://charts.bitnami.com/bitnami

Step-2 :勾选你要安装的mongo版本并注意对应的最新图表版本

第 3 步:使用上面的图表版本使用 --version 安装特定版本的 mongoDB。

helm install my-mongodb bitnami/mongodb --version 8.3.1

注意: 8.3.1 是图表版本不是 mongoDB 版本