gpt4 book ai didi

kubernetes - K8s : how to install charts from the Helm Hub

转载 作者:行者123 更新时间:2023-12-03 11:23:03 25 4
gpt4 key购买 nike

免责声明:我是 Kubernetes 和 Helm 的新手。

我正在尝试使用全新的 Helm Hub 安装 Helm 图表,但在我的一生中,我无法弄清楚这应该如何工作。

仅在几个月前发布了新版本的 Helm (3.0),其中发生了重大变化,其中之一是它没有配置任何存储库。 Helm 发布了 Helm Hub,它应该是一个用于查找图表的中心化服务。

我正在尝试安装 CloudBees Jenkins 图表。这是我搜索集线器时得到的:

[me@localhost tmp]$ helm search hub cloudbees -o yaml
- app_version: 2.222.1.1
description: The Continuous Delivery Solution for Enterprises
url: https://hub.helm.sh/charts/cloudbees/cloudbees-core
version: 3.12.0+80c17a044bc4
- app_version: 9.2.0.139827
description: A Helm chart for CloudBees Flow
url: https://hub.helm.sh/charts/cloudbees/cloudbees-flow
version: 1.1.1
- app_version: 9.2.0.139827
description: A Helm chart for CloudBees Flow Agent
url: https://hub.helm.sh/charts/cloudbees/cloudbees-flow-agent
version: 1.1.1
- app_version: 2.204.3.7
description: CloudBees Jenkins Distribution provides development teams with a highly
dependable, secure, Jenkins environment curated from the most recent supported
Jenkins release. The distribution comes with a recommended catalog of tested plugins
available through the CloudBees Assurance Program.
url: https://hub.helm.sh/charts/cloudbees/cloudbees-jenkins-distribution
version: 2.204.307
- app_version: 2.0.2
description: Helm chart for sidecar injector webhook deployment
url: https://hub.helm.sh/charts/cloudbees/cloudbees-sidecar-injector
version: 2.0.2

所以看起来我正在寻找的图表可用: cloudbees-jenkins-distribution .

但是,我找不到从集线器安装或基于集线器输出添加存储库的任何方法。我尝试过的一些事情:
[me@localhost tmp]$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "incubator" chart repository
...Successfully got an update from the "gitlab" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈

[me@localhost tmp]$ helm install myJenkins cloudbees-jenkins-distribution
Error: failed to download "cloudbees-jenkins-distribution" (hint: running `helm repo update` may help)

[me@localhost tmp]$ helm repo add cbRepo https://hub.helm.sh/charts/cloudbees
Error: looks like "https://hub.helm.sh/charts/cloudbees" is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: line 8: mapping values are not allowed in this context

[me@localhost tmp]$ helm repo add cbRepo https://hub.helm.sh/charts/cloudbees/cloudbees-jenkins-distribution
Error: looks like "https://hub.helm.sh/charts/cloudbees/cloudbees-jenkins-distribution" is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: line 8: mapping values are not allowed in this context

文档确实没有说明我应该如何从 Helm Hub 转到已安装的图表。我在这里缺少什么?

最佳答案

Helm Hub 不像一个存储库,您可以从中添加和安装 Helm Charts。 它也不会公开有效的 repos url。这就是您收到如下错误消息的原因:

Error: looks like "https://hub.helm.sh/charts/cloudbees" is not a valid chart repository ...

当您尝试运行时 helm repo addhttps://hub.helm.sh基于 网址 .

我知道它可能看起来很困惑,但它的设计就是这样。请引用 this discussion Github .具体 this comment再解释一下,我希望它也能回答你的问题:

hub.helm.sh is not the helm repo, so it will not work the you trying, it is only meant to view and search for charts. check in there for chart repository and it that way, then you will be able to install the charts.



不幸的是 official helm documentation不能很好地解释它。它只提到:

helm search hub searches the Helm Hub, which comprises helm charts from dozens of different repositories.



但它显示“没有解释如何从 helm search repo 得到 hub.helm.shhelm repo add,它神奇地显示了要使用的新网址。” - 正如一位用户在 the thread 中所写上文提到的。

关于kubernetes - K8s : how to install charts from the Helm Hub,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60994725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com