#使用nginx 起一个helm的http服务
[root@master1 ~]# docker run -d --name=nginx -p 81:80 -v /root/charts:/usr/share/nginx/html/charts nginx
#把本地的helm-chart打包并上传私有仓库
[root@master1 ~]# helm package rabbitmq
[root@master1 ~]# helm package mysql/bitnami-mysql/mysql
[root@master1 ~]# mv ./*.tgz /root/charts
#更新index.yaml
[root@master1 ~]# helm repo index /root/charts --url http://10.15.123.93:81/charts #该操作会在/root/charts/目录生成index.yaml文件,该文件包含了helm库应用信息
[root@master1 ~]# ls /root/charts/ #查看是否生成
#添加helm私有仓库到本地
[root@master1 ~]# helm repo add myrepo http://10.15.123.93:81/charts
#验证
[root@master1 ~]# helm repo ls
[root@master1 ~]# helm search repo myrepo
#安装、卸载
[root@master1 ~]# helm install mysql myrepo/mysql -n mysql --create-namespace
[root@master1 ~]# helm ls -n mysql
[root@master1 ~]# helm uninstall mysql -n mysql
#其他常用操作:
#创建testechart
[root@master1 ~]# helm create testchart
#删除本地仓库
[root@master1 ~]# helm repo remove myrepo
#更新发布:打包上传重新生成index文件后,执行更新仓库及更新mysql操作
[root@master1 ~]# helm package mysql/bitnami-mysql/mysql
[root@master1 ~]# mv ./mysql-9.3.3.tgz /root/charts
[root@master1 ~]# helm repo index /root/charts --url http://10.15.123.93:81/charts
[root@master1 ~]# helm repo update
[root@master1 ~]# helm upgrade mysql myrepo/mysql -n mysql --create-namespace
参考:https://blog.csdn.net/u011127242/article/details/118197361
本文档详细介绍了如何利用Docker运行Nginx服务,并通过Helm打包上传 Helm 图表到私有仓库。步骤包括创建HTTP服务、打包 Helm 图表、更新索引文件、添加私有仓库到本地、安装与卸载 Helm 应用,以及后续的更新与升级操作。此外,还提到了创建新的Helm chart、删除本地仓库等常见操作。

1257

被折叠的 条评论
为什么被折叠?



