helm搭建本地chart仓库及基本操作

这个步骤,是配合公司的竞赛。

因为公司这次的环境,我们只有namespace权限,而没有整个集群的管理,

而且,公司没有提供统一的helm chart repo,

所以只能自建。

参考URL:

http://www.acaiblog.cn/2018/11/13/helm%E6%90%AD%E5%BB%BAchart%E6%9C%AC%E5%9C%B0%E4%BB%93%E5%BA%93/

https://www.hi-linux.com/posts/21466.html

一,安装helm客户端

# 下载 Helm 
$ wget https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-linux-amd64.tar.gz
# 解压 Helm
$ tar -zxvf helm-v2.9.1-linux-amd64.tar.gz
# 复制客户端执行文件到 bin 目录下
$ cp linux-amd64/helm /usr/local/bin/

 

二,初始化

好像公司给每个名字空间下已安装有一个tiller,所以,初始化时,不能像新的集群一样,要skip-refresh,且要指定tiller-namespaces。

helm init --service-account tiller --tiller-image hub.yun.xxx.com.cn/helm/tiller:v2.7.2 --tiller-namespace myname --skip-refresh

 

三,删除默认repo

helm repo remove stable

 

四,启动一个helm本地仓库

helm serve &

 

五,创建一个chart

helm create mychart

 

六,编辑chart内容

七,应用打包到local仓库

helm package mychart

 

八,更新helm repo

helm repo update

 

九,查看本地仓库内容

我们只能查看指定的namespace,所以,使用helm命令时,要么带上 --tiller-namespace这个尾巴,要么 exportr TILLER_NAMESPACE =myname。就比较一劳永逸了。

helm search

十,将chart部署到集群

这里,要指定namespaces

helm install --debug local/nginx --name nginx-myname --namespace myname

十一,升级chart

helm upgrade nginx-myname local/tomcat

 

十二,查看历史release

helm history nginx-myname

十三,回滚指定版本

helm rollback nginx-myname 2

 

转载于:https://www.cnblogs.com/aguncn/p/11304341.html

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值