Link

Helm3

目录

  1. TOC {:toc}

常用命令

查看 helm 版本


helm version
version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"clean", GoVersion:"go1.13.12"}

查看已安装的 charts

helm list

搜索 repo

helm search repo gitlab
NAME                         	CHART VERSION	APP VERSION	DESCRIPTION
gitlab/gitlab                	4.1.0        	13.1.0     	Web-based Git-repository manager with wiki and ...
gitlab/gitlab-omnibus        	0.1.37       	           	GitLab Omnibus all-in-one bundle
gitlab/gitlab-runner         	0.18.0       	13.1.0     	GitLab Runner
gitlab/kubernetes-gitlab-demo	0.1.29       	           	GitLab running on Kubernetes suitable for demos
gitlab/auto-deploy-app       	0.7.0        	           	GitLab's Auto-deploy Helm Chart
gitlab/consul                	0.20.1       	1.7.2      	Official HashiCorp Consul Chart
gitlab/elastic-stack         	3.0.0        	7.6.2      	A Helm chart for Elastic Stack
gitlab/fluentd-elasticsearch 	6.2.3        	2.8.0      	A Fluentd Helm chart for Kubernetes with Elasti...
gitlab/knative               	0.9.0        	0.9.0      	A Helm chart for Knative
gitlab/plantuml              	0.1.12       	1.0        	PlantUML server

添加 Repo

helm repo add gitlab https://charts.gitlab.io/

更新repo

helm repo update

查看已添加的 repo

helm repo list
NAME  	URL
gitlab	https://charts.gitlab.io/

下载 charts 到本地

helm fetch gitlab/gitlab

#如果想将下载的 tgz 文件解压,使用 --untar 参数
helm fetch --untar gitlab/gitlab

生成部署 yaml 文件

helm template --debug gitlab ./gitlab
#前面的 gitlab 指部署名称,后面是 charts 路径。
#如果未使用 untar 命令解压 tgz,则将路径换成 XX.tgz 即可。
#如果不指定路径,则会从网上下载,例如 helm template gitlab gitlab/gitlab

直接通过 charts 部署

helm install gitlab ./gitlab

参考资料:

https://blog.51cto.com/michaelkang/2429570

https://www.cnblogs.com/DaweiJ/articles/8926893.html