1.查看版本
[root@rds005-master-1 hello]# helm version
version.BuildInfo{Version:"v3.6.0", GitCommit:"7f2df6467771a75f5646b7f12afb408590ed1755", GitTreeState:"clean", GoVersion:"go1.16.3"}
2.仓库管理
# helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
[root@rds005-master-1 hello]# helm repo add apphub https://apphub.aliyuncs.com
"apphub" has been added to your repositories
[root@rds005-master-1 helm]# helm repo list
NAME URL
apphub https://apphub.aliyuncs.com
[root@rds005-master-1 helm]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "apphub" chart repository
Update Complete. ⎈Happy Helming!⎈
3.部署应用
[root@rds005-master-1 helm]# helm search repo nacos
NAME CHART VERSION APP VERSION DESCRIPTION
apphub/nacos 0.1.0 1.0 A Helm chart for Kubernetes
[root@rds005-master-1 helm]# helm install apphub/nacos -n default
Error: must either provide a name or specify --generate-name
[root@rds005-master-1 helm]# helm install -name lys-nacos apphub/nacos -n default
NAME: lys-nacos
LAST DEPLOYED: Sat Nov 13 15:17:13 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services nacos-cs
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/nacos
2. MODE:
quickstart: you need to modify replicaCount in the values.yaml, .Values.replicaCount=1
standalone: you need to modify replicaCount in the values.yaml, .Values.replicaCount=1
cluster: kubectl scale sts default-nacos --replicas=3
[root@rds005-master-1 helm]# helm uninstall lys-nacos
release "lys-nacos" uninstalled
4.拉取
[root@rds005-master-1 helm]# helm search repo gitlab
NAME CHART VERSION APP VERSION DESCRIPTION
apphub/docker-gitlab 0.1.1 v12.1.6 GitLab CE is set up in the Docker image using t...
stable/gitlab-ce 0.2.1 GitLab Community Edition
stable/gitlab-ee 0.2.1 GitLab Enterprise Edition
[root@rds005-master-1 helm]# mkdir gitlab
[root@rds005-master-1 helm]# cd gitlab/
[root@rds005-master-1 gitlab]# ls
[root@rds005-master-1 gitlab]# helm pull apphub/docker-gitlab
[root@rds005-master-1 gitlab]# ls
docker-gitlab-0.1.1.tgz
[root@rds005-master-1 gitlab]# tar -zxvf docker-gitlab-0.1.1.tgz
参考文档
https://helm.sh/docs/
https://artifacthub.io/