无法在Kubernetes集群上使用Helm Chart部署服务

时间:2019-09-25 10:16:39

标签: kubernetes kubernetes-helm

我正在尝试使用kubernetes集群上的头盔图来部署服务。

引发错误
  

”错误:非绝对网址应采用以下形式:   repo_name / path_to_chart,得到:留言簿“

这是我正在部署的https://github.com/phcollignon/helm/tree/master/lab5_helm_chart_version1/

留言簿服务

provider.helm v2.14.3

provider.kubernetes v1.16

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
$ helm install guestbook
Error: failed to download "guestbook" (hint: running `helm repo update` may help)
$ helm version
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
$ helm install guestbook --debug
[debug] Created tunnel using local port: '39069'

[debug] SERVER: "127.0.0.1:39069"

[debug] Original chart version: ""
Error: Non-absolute URLs should be in form of repo_name/path_to_chart, got: guestbook

1 个答案:

答案 0 :(得分:0)

您可以通过五种不同的方式来表达要安装的图表:

  1. 通过图表参考:helm install stable/mariadb
  2. 通过打包图表的路径:helm install ./nginx-1.2.3.tgz
  3. 通过打开的图表目录路径:helm install ./nginx
  4. 通过绝对URL:helm install https://example.com/charts/nginx-1.2.3.tgz
  5. 通过图表参考和回购网址:helm install --repo https://example.com/charts/ nginx

有使用选项号 3

的示例

使用以下命令下载github存储库:

git clone https://github.com/phcollignon/helm

然后转到 lab5_helm_chart_version1 文件

cd helm/lab5_helm_chart_version1

只需使用helm install来创建留言簿

helm install chart/guestbook/ --name guestbook