Helm 使用小结

1.What is Helm

Helm is a tool for managing Kubernetes packages called charts.

Three important concepts

  • The Chart is a bundle of information necessary to create an instance of a Kubernetes application.
  • A Release is a running instance of a chart, combined with a specific config.
  • Repository – Publicly available charts.

Helm v2 和 v3的架构如下,主要区别是 Tiller。

helm_arch.png

当然 helm v2与 v3 在命令上也有一些区别,不过老的命令(例如fetch)亲自试验过还能用

Command Helm2 Helm3
Initialize Helm client/server init
Download a chart to your local directory fetch pull
Given a release name, delete the release from Kubernetes delete uninstall
Helm client environment information env
Displays the location of HELM_HOME home
Inspect a chart inspect show
Uninstalls Tiller from a cluster reset

Hub - > repo -> Chart -> App, 从左到右均是一对多的关系。

2.一些常用的命令

关于repo

list repos

helm repo list

add a repo

helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts

remove a repo, then check again

helm repo remove aliyun && helm repo list

helm search hub – Searches through the Artifact Hub from dozens of repositories.

helm search hub wordpress

helm search repo – Searches through repositories added in the local helm client using helm repo add.

helm search repo wordpress

When you find a suitable chart, install it using helm install

一个repo里可以有多个chart,

关于chart

download a chart to local

helm pull csi-secrets-store-provider-azure/csi-secrets-store-provider-azure --version 0.0.19 --untar

list all the charts in a repository

helm search repo bitnami

helm repo add stable https://charts.helm.sh/stable

helm show readme stable/ghost

helm install --values=ghost-values.yaml stable/ghost --generate-name

helm ls

helm delete ghost-1622450894

What else

helm upgrade --values=ghost-values.yaml ghost-1576075187 stable/ghost

rollback the app to a specific version

helm rollback ghost-1576075187 1

helm uninstall ghost-1576075187

check all resources which is deployed with helm

helm get manifest datadog -n datadog


Reference:

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2019-2024 John Doe
  • Visitors: | Views:

请我喝杯咖啡吧~