概念
Charts 是Helm的程序包,他们存储于Charts仓库,Kubernetes官方的Charts仓库保存了一系列精心制作和维护的Charts,仓库的默认名称为”stable”。安装Charts到Kubernetes集群时,Helm首先会到Kubernetes官方的Charts仓库中获取到相关的Charts,而后将其安装并创建为Release。
常用命令
1、 helm repo 用于管理使用的Charts仓库,其update子命令能够更新使用默认仓库的元数据信息
helm repo updata
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
2、 helm search 可列出stable仓库中维护的所有Charts的列表
[appuser@stateful ~]$ helm search
NAME CHART VERSION APP VERSION DESCRIPTION
stable/acs-engine-autoscaler 2.1.3 2.1.1 Scales worker nodes within agent pools
stable/aerospike 0.1.7 v3.14.1.2 A Helm chart for Aerospike in Kubernetes
stable/anchore-engine 0.1.3 0.1.6 Anchore container analysis and policy evaluation engine s...
stable/artifactory 7.0.3 5.8.4 Universal Repository Manager supporting all major packagi...
stable/artifactory-ha 0.1.0 5.8.4 Universal Repository Manager supporting all major packagi...
stable/aws-cluster-autoscaler 0.3.2
.
.
.
3、 helm inspect 可以打印出指定的Charts的详细信息
[appuser@stateful ~]$ helm search redis
NAME CHART VERSION APP VERSION DESCRIPTION
stable/redis 1.1.15 4.0.8 Open source, advanced key-value store. It is often referr...
stable/redis-ha 2.0.1 Highly available Redis cluster with multiple sentinels an...
stable/sensu 0.2.0 Sensu monitoring framework backed by the Redis transport
helm inspect stable/redis
.
.
.
4、 helm install 安装指定的Charts为Kubernetes集群的Release,使用 -n 指定Release名称,安装测试使用 —dry-run 选项
helm install stable/redis -n redis --dry-run
5、 helm delete 删除一个Release
helm delete redis
6、 helm fetch stable/xxx 即search之后拉取指定的资源配置包
helm fetch stable/elasticsearch
文档更新时间: 2022-02-09 09:41 作者:张尚