概念

Charts 是Helm的程序包,他们存储于Charts仓库,Kubernetes官方的Charts仓库保存了一系列精心制作和维护的Charts,仓库的默认名称为”stable”。安装Charts到Kubernetes集群时,Helm首先会到Kubernetes官方的Charts仓库中获取到相关的Charts,而后将其安装并创建为Release。

常用命令

1、 helm repo 用于管理使用的Charts仓库,其update子命令能够更新使用默认仓库的元数据信息

  1. helm repo updata
  2. Hang tight while we grab the latest from your chart repositories...
  3. ...Skip local chart repository
  4. ...Successfully got an update from the "stable" chart repository
  5. Update Complete.

2、 helm search 可列出stable仓库中维护的所有Charts的列表

  1. [appuser@stateful ~]$ helm search
  2. NAME CHART VERSION APP VERSION DESCRIPTION
  3. stable/acs-engine-autoscaler 2.1.3 2.1.1 Scales worker nodes within agent pools
  4. stable/aerospike 0.1.7 v3.14.1.2 A Helm chart for Aerospike in Kubernetes
  5. stable/anchore-engine 0.1.3 0.1.6 Anchore container analysis and policy evaluation engine s...
  6. stable/artifactory 7.0.3 5.8.4 Universal Repository Manager supporting all major packagi...
  7. stable/artifactory-ha 0.1.0 5.8.4 Universal Repository Manager supporting all major packagi...
  8. stable/aws-cluster-autoscaler 0.3.2
  9. .
  10. .
  11. .

3、 helm inspect 可以打印出指定的Charts的详细信息

  1. [appuser@stateful ~]$ helm search redis
  2. NAME CHART VERSION APP VERSION DESCRIPTION
  3. stable/redis 1.1.15 4.0.8 Open source, advanced key-value store. It is often referr...
  4. stable/redis-ha 2.0.1 Highly available Redis cluster with multiple sentinels an...
  5. stable/sensu 0.2.0 Sensu monitoring framework backed by the Redis transport
  6. helm inspect stable/redis
  7. .
  8. .
  9. .

4、 helm install 安装指定的Charts为Kubernetes集群的Release,使用 -n 指定Release名称,安装测试使用 —dry-run 选项

  1. helm install stable/redis -n redis --dry-run

5、 helm delete 删除一个Release

  1. helm delete redis

6、 helm fetch stable/xxx 即search之后拉取指定的资源配置包

  1. helm fetch stable/elasticsearch
文档更新时间: 2022-02-09 09:41   作者:张尚