helm的使用

1.安装helm

Helm | 安装Helm

添加helm源

helm repo add stable http://mirror.azure.cn/kubernetes/charts/
helm repo add bitnami https://charts.bitnami.com/bitnami

2.下载包到本地,解压后编辑value.yaml后应用

[root@master test]# helm fetch stable/mysql
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
[root@master test]# ls
mysql  mysql-1.6.9.tgz
vi values.yaml
helm install testsql mysql

3.配置更新

helm upgrade -f test.yaml testmysql ./mysql

查看更新

helm get values testmysql

查看历史记录

helm history testmysql 

版本回滚

helm rollback testmysql 1 

4.Helm管理Chart包

helm create mychart

 打包

[root@master testchart]# helm package mychart
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
Successfully packaged chart and saved it to: /root/test/testchart/mychart-0.1.0.tgz

[root@master testchart]# ls
mychart  mychart-0.1.0.tgz

查看是否合法

[root@master testchart]# helm lint mychart
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
==> Linting mychart
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed

部署:

helm install testchart mychart-0.1.0.tgz 

上传到制品仓库(harbor或者其他):

测试渲染

 helm template mychart-0.1.0.tgz >xuanran.yaml

helm install --generate-name --dry-run --debug ./mychart


cat xuanran.yaml 

4,helm安装mq

helm 安装 RabbitMQ 集群 - evescn - 博客园

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值