【发布时间】:2019-09-22 05:48:23
【问题描述】:
我有一个 helm repo:
helm repo list
名称网址
我想列出所有可用的图表或在stable helm repo 下搜索图表。
我该怎么做?
目前还没有命令可以列出 helm repo 下的可用图表,或者只是验证图表是否存在。
【问题讨论】:
标签: kubernetes kubernetes-helm
我有一个 helm repo:
helm repo list
名称网址
我想列出所有可用的图表或在stable helm repo 下搜索图表。
我该怎么做?
目前还没有命令可以列出 helm repo 下的可用图表,或者只是验证图表是否存在。
【问题讨论】:
标签: kubernetes kubernetes-helm
首先,始终更新您的本地缓存:
helm repo update
然后,您可以通过以下方式列出所有图表:
helm search repo
或者,您可以使用以下方法对图表名称的任何部分进行不区分大小写的匹配:
helm search repo [your_search_string]
最后,如果要列出所有版本,可以使用 -l/--version 参数:
# Lists all versions of all charts
helm search repo -l
# Lists all versions of all chart names that contain search string
helm search repo -l [your_search_string]
【讨论】:
helm search repo 不起作用。输出Usage: helm search [command]
# Lists all versions of all charts helm search repo -l 也一样
您可以使用helm search to search for Helm charts。您可以将一个有趣的选项传递给helm search,它可以让您使用正则表达式来搜索图表。这样,您可以传递与任何图表名称匹配的正则表达式。例如
helm search -r ".*"
这将显示所有存储库上的所有图表。
【讨论】:
-r 标志似乎不再起作用。
我相信您正在寻找:
掌舵搜索
你的情况
掌舵搜索稳定
或
本地搜索
编辑:文档链接:https://helm.sh/docs/using_helm/#helm-search-finding-charts
【讨论】:
你可以做一个“helm search repo”。 我正在使用 helm version.BuildInfo{Version:"v3.0.1"} 希望对你有帮助
【讨论】:
要列出特定应用程序的所有可用图表,您可以尝试以下命令:
应用程序 - 示例应用程序
helm search stable/sample-app -l
【讨论】:
您可以使用 grep 以及如下。
获取所有添加的存储库的列表。
helm repo list
更新您的存储库
helm repo update
在您拥有的所有存储库中搜索“nginx”
helm search repo nginx
列出所有bitnami中的包
helm search repo bitnami
最后你可以使用 grep 在给定的 repo 中过滤掉
helm search repo bitnami | grep nginx
【讨论】:
添加 repo 并搜索它:
$helm add <repo> <repo url>
$helm search --regexp <repo>/*
将 repo 替换为您要搜索的 repo,比如 jetstack
$ helm search --regexp jetstack/*
【讨论】:
helm search --regexp some-repo/* zsh: no matches found: some-repo/*
v3.2.1 并且该标志似乎已被删除。如果您想搜索某些内容,只需使用helm search repo <chart-name>。但您仍然需要添加要从中搜索的存储库。
只需helm search repo 列出所有图表,helm search repo search_text 即可根据输入的搜索文本列出图表。
例如:helm search repo my_chart
【讨论】:
看完了这个问题的所有答案,答案似乎是:
你不能。
【讨论】:
这对我有帮助:
helm repo update:用于更新存储库。helm search repo <repo_name>:查看<repo_name> repo 中的所有 helm 图表。【讨论】: