zoukankan      html  css  js  c++  java
  • helm-chart-1-简单概念介绍-仓库搭建-在rancher上的使用

    简单的概念介绍:

    Chart是helm管理的应用的打包格式,一个chart对应一个或一套应用。内部是一系列的yaml描述文件,以为为yaml 服务的文件。

    三个部分,helm 、tiller、repo 。helm,类似于 client,用来执行一些操作命令;tiller,运行依赖k8s环境,接收helm的指令,实际进行集群内部应用的管理;repo,应用的仓库,独立于前两者,提供chart。

    1,helm-client下载地址

    https://github.com/kubernetes/helm

    只是搭建仓库的话,只需要helm client 不用安装helm 的server(tiller),k8s或者rancher

    2,获取charts,创建仓库(repo),更新仓库

    添加仓库源:helm repo add fantastic-charts https://fantastic-charts.storage.googleapis.com

    获取某个chart: helm search chartName ; 然后,helm fetch chartName。

    创建仓库 :所有要用来组成仓库的chart的打包格式 要在一个文件夹内,这里假设这个文件夹命名charts,下同。在 charts的上层文件夹执行: helm serve --repo-path ./charts 这会生成一个,index.yaml ,与chart 的包同级目录。

    新加入chart的时候,要更新inde.yaml才能生效。命令; helm repo index ./charts(目录)

    仓库只识别包(eg: XXX.tgz)的形式。自己创建的chart 需要package 一下,在加入repo。 (helm package chart-name/)

    启动仓库,在Rancher 里应用

    启动仓库

    (Rancher) 用gitserver的形式,提供仓库:把各个chart 的文件夹,直接添加到git中,push到远程仓库,远程仓库的地址即可用在Rancher里。(严格意义上并不是一个helm的仓库,只是一个chart的集合)。
      
    rancher,内添加:Gloable内的 cataLog里,addcataLog,即添加到了Rancher内 。

    如果在线的git servier 不能用,可以搭建 git server :

    创建 git仓库:git init --bare name.git

    启动server :git daemon --reuseaddr --base-path=/home/repo(name.git 的外层目录) --export-all --verbose --enable=receive-pack

    还可以直接跑一个gitlab 的镜像,方便快捷!

    Rancher 不支持下面两种方式的helm repo,可以给helm client用

    python 启http服务的形式,在charts的上层目录执行: python -m SimpleHTTPServer 8777
    然后,http://ip:portnum/charts/ 即为可用的应用商店的地址。

    helm serve --repo-path path --address ip:portNum 直接用helm 启动的方式。

    官方doc

    http://helm.readthedocs.io/en/latest/
    

    转载注明出处:

    https://www.jianshu.com/p/f5f420154fa0

  • 相关阅读:
    闭包问题
    二级联动多选器
    一个和与后台数据连接的模板get post put 以及延伸的query
    鼠标经过图片的小动画
    UITableViewCell中cell重用机制导致内容重复的方法
    iOS Button在ios6的系统上无法实现点击,在更高版本的系统上可以
    iOS 使用Reachability实时检测网络连接状况
    iOS Uibutton防止多按钮同时按下
    iOS plist文件的添加
    iOS Xcode cannot run using the selected device.
  • 原文地址:https://www.cnblogs.com/mingbai/p/helmchart.html
Copyright © 2011-2022 走看看