K8s:如何从Helm Hub安装图表

问题描述 投票:0回答:1

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

[我正在尝试使用全新的Helm Hub安装Helm图表,对于我的一生,我不知道这应该如何工作。

仅在几个月前发布了新版本的Helm(3.0),并进行了重大更改,其中之一是未配置任何存储库。 Helm发布了Helm Hub,该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转到已安装的图表。我在这里想念什么?

kubernetes kubernetes-helm
1个回答
4
投票
的新版本

Helm Hub不像您可以从Helm图表中添加和安装的仓库。它也不公开有效的仓库URL。这就是为什么您收到如下错误消息的原因:

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

当您试图在基于helm repo addurls上运行https://hub.helm.sh时。

我知道它看起来似乎很令人困惑,但是按照它的设计,它就像那样工作。请参考Github上的this discussion。具体来说,this comment会对其进行详细说明,希望它也能回答您的问题:

hub.helm.sh不是掌舵仓库,所以您尝试使用它不会起作用,它仅用于查看和搜索图表。在那里检查图表存储库及其这种方式,那么您将能够安装图表。

不幸的是,official helm documentation解释得不够好。它仅提及:

helm search hub搜索包括头盔图表的头盔中心来自数十个不同的存储库。

但是它显示“没有解释如何从显示helm search repohub.helm.sh到神奇地显示要使用的新URL的helm repo add。”>-如一个用户在上述the thread中写道。


0
投票

Helm.sh不是头盔仓库,头盔搜索中心不返回仓库网址。您可以从头盔中心UI或从here获取存储库网址。

© www.soinside.com 2019 - 2024. All rights reserved.