# 查看当前仓库 $ helm repo list NAME URL local http://192.168.10.100:8879/charts
# 增加仓库 $ helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts $ helm repo list NAME URL local http://192.168.10.100:8879/charts stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
2.搜索仓库应用
# 搜索 wordpress 应用 $ helm search wordpress NAME CHART VERSION APP VERSION DESCRIPTION stable/wordpress 0.8.8 4.9.4 Web publishing platform for building blogs and websites.
# 搜索 jenkins 应用 $ helm search jenkins NAME CHART VERSION APP VERSION DESCRIPTION local/jenkins 0.13.5 2.73 Open source continuous integration server. It supports mu... stable/jenkins 0.13.5 2.73 Open source continuous integration server. It supports mu...
# 列出已删除的应用版本 $ helm ls --deleted NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE linuxhub-jenkins 1 Mon Mar 18 11:30:18 2019 DELETED jenkins-0.13.5 2.73 default
# 已经没要相关记录信息了 $ helm hist linuxhub-jenkins Error: release: "linuxhub-jenkins" not found
# helm ls 命令也已均无查询记录 $ helm ls --deleted $ helm ls -a linuxhub-jenkins
6.下载远程仓库应用到本地
#下载远程仓库jenkins应用到本地 $ helm fetch stable/jenkins $ ls jenkins-0.13.5.tgz
7.打包应用
#解压下载的Chart包应用 $ tar xvf jenkins-0.13.5.tgz
# 编辑应用,例如修改下版本号 $ vim jenkins/Chart.yaml version: 0.13.6-linuxhub
# 打包应用 $ helm package jenkins --debug Successfully packaged chart and saved it to: /home/k8s/linxuhub/jenkins-0.13.6-linuxhub.tgz [debug] Successfully saved /home/k8s/linxuhub/jenkins-0.13.6-linuxhub.tgz to /data/helm/repository/loca
8.安装本地应用
# 从本地仓库安装 $ helm search local/jenkins NAME CHART VERSION APP VERSION DESCRIPTION local/jenkins 0.13.6-linuxhub 2.73 Open source continuous integration server. It supports mu...
# 升级前版本 (jenkins-0.13.6-linuxhub) $ helm list zeze-jenkins NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE zeze-jenkins 1 Mon Mar 18 12:03:29 2019 DEPLOYED jenkins-0.13.6-linuxhub 2.73 default
# 升级版本 (jenkins-0.13.7) $ helm upgrade zeze-jenkins /home/k8s/linxuhub/jenkins-0.13.7.tgz Release "zeze-jenkins" has been upgraded. Happy Helming!
# 升级后版本 (jenkins-0.13.7) $ helm list zeze-jenkins NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE zeze-jenkins 2 Mon Mar 18 12:10:52 2019 DEPLOYED jenkins-0.13.7 2.73 default
7.回退应用版本
# 回退前版本(jenkins-0.13.7) $ helm list zeze-jenkins NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE zeze-jenkins 2 Mon Mar 18 12:10:52 2019 DEPLOYED jenkins-0.13.7 2.73 default
# 列出历史版本 $ helm history zeze-jenkins REVISION UPDATED STATUS CHART DESCRIPTION 1 Mon Mar 18 12:03:29 2019 SUPERSEDED jenkins-0.13.6-linuxhub Install complete 2 Mon Mar 18 12:10:52 2019 DEPLOYED jenkins-0.13.7 Upgrade complete
# 回退上一个版本 $ helm rollback zeze-jenkins 1 Rollback was a success! Happy Helming!
# 回退后的版本(jenkins-0.13.6-linuxhub) $ helm list zeze-jenkins NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE zeze-jenkins 3 Mon Mar 18 12:16:06 2019 DEPLOYED jenkins-0.13.6-linuxhub 2.73 default