专注方向:
自动化流程服务
it咨询
it在线教学
doc
https://helm.sh/
介绍
Helm is the best way to find, share, and use software built for Kubernetes.
helm 是查找, 分享, 使用 k8s 软件的最好方式
必要条件
Prerequisites
The following prerequisites are required for a successful and properly secured use of Helm.
- A Kubernetes cluster
- Deciding what security configurations to apply to your installation, if any
- Installing and configuring Helm.
安装
Install Helm
Download a binary release of the Helm client. You can use tools like homebrew, or look at the official releases page.
For more details, or for other options, see the installation guide.
snap install helm helm completion bash > /etc/bash_completion.d/helm
使用
helm repo add bitnami https://charts.bitnami.com/bitnami helm search repo bitnami # Make sure we get the latest list of charts helm repo update # helm install [NAME] [CHART] [flags] helm install bitnami/mysql --generate-name # 更多的例子 # $ helm install -f myvalues.yaml myredis ./redis # or # $ helm install --set name=prod myredis ./redis # or # $ helm install --set-string long_int=1234567890 myredis ./redis # or # $ helm install --set-file my_script=dothings.sh myredis ./redis # You can specify the '--values'/'-f' flag multiple times. The priority will be given to the # last (right-most) file specified. For example, if both myvalues.yaml and override.yaml # contained a key called 'Test', the value set in override.yaml would take precedence: # $ helm install -f myvalues.yaml -f override.yaml myredis ./redis # You can specify the '--set' flag multiple times. The priority will be given to the # last (right-most) set specified. For example, if both 'bar' and 'newbar' values are # set for a key called 'foo', the 'newbar' value would take precedence: # $ helm install --set foo=bar --set foo=newbar myredis ./redis
验证
helm install helm-nginx bitnami/nginx kubectl -n default get svc helm-nginx helm list # NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION # helm-nginx default 1 2022-12-15 01:05:28.734881318 +0000 UTC deployed nginx-13.2.17 1.23.3 helm uninstall helm-nginx # release "helm-nginx" uninstalled