Helm

Chart仓库

helm 架构 https://helm.sh/docs/architecture/

主要概念

  • chart 创建Kubernetes应用程序实例所必需的一组信息
  • config 包含可以合并到打包chart中 以创建r elease 对象的配置信息。
  • release chart 的运行实例,具有特定的config

组件

Helm有两个主要组成部分:

Helm Client 是最终用户的命令行客户端。客户负责以下功能:

  • 本地chart开发
  • 管理 仓库
  • 与Tiller服务器交互
    • 发送要安装的chart
    • 查询有关release的信息
    • 请求升级或卸载现有的 releases

Tiller Server 是一个集群内服务器,与Helm客户端交互,并与Kubernetes API服务器连接。服务器负责以下事项:

  • 侦听来自Helm client 的传入请求
  • 结合chart和config来构建版本
  • 将Chart安装到Kubernetes中,然后跟踪 release
  • 通过与Kubernetes交互来升级和卸载Charts

简而言之,客户端负责管理图表,服务器负责管理版本。

helm 命令

helm search
helm repo update
helm list release 管理
helm inspect # 查看chart信息
helm install
helm delete
helm upgrade
helm rolleback char 操作
helm create
helm fetch
helm inpect 查看chart的详细信息
helm package 打包chart文件

使用阿里云的helm仓库

helm init --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.5.1 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts

自定义charts

wordpress/
Chart.yaml # A YAML file containing information about the chart
LICENSE # OPTIONAL: A plain text file containing the license for the chart
README.md # OPTIONAL: A human-readable README file
requirements.yaml # OPTIONAL: A YAML file listing dependencies for the chart
values.yaml # The default configuration values for this chart
charts/ # A directory containing any charts upon which this chart depends.
templates/ # A directory of templates that, when combined with values,
# will generate valid Kubernetes manifest files.
templates/NOTES.txt # OPTIONAL: A plain text file containing short usage notes

THE CHART.YAML FILE

The Chart.yaml file is required for a chart. It contains the following fields:

apiVersion: The chart API version, always "v1" (required)
name: The name of the chart (required)
version: A SemVer 2 version (required)
kubeVersion: A SemVer range of compatible Kubernetes versions (optional)
description: A single-sentence description of this project (optional)
keywords:
- A list of keywords about this project (optional)
home: The URL of this project's home page (optional)
sources:
- A list of URLs to source code for this project (optional)
maintainers: # (optional)
- name: The maintainer's name (required for each maintainer)
email: The maintainer's email (optional for each maintainer)
url: A URL for the maintainer (optional for each maintainer)
engine: gotpl # The name of the template engine (optional, defaults to gotpl)
icon: A URL to an SVG or PNG image to be used as an icon (optional).
appVersion: The version of the app that this contains (optional). This needn't be SemVer.
deprecated: Whether this chart is deprecated (optional, boolean)
tillerVersion: The version of Tiller that this chart requires. This should be expressed as a SemVer range: ">2.0.0" (optional)

requirements.yaml

A requirements.yaml file is a simple file for listing your dependencies.

dependencies:
- name: apache
version: 1.2.3
repository: http://example.com/charts
- name: mysql
version: 3.2.1
repository: http://another.example.com/charts

使用helm dep下载依赖

$ helm dep up foochart
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "example" chart repository
...Successfully got an update from the "another" chart repository
Update Complete. Happy Helming!
Saving 2 charts
Downloading apache from repo http://example.com/charts
Downloading mysql from repo http://another.example.com/charts

自动生成目录结构

go 模板语法

helm 自定义仓库主要命令

# 创建helm仓库
helm create # helm 检测语法
helm lint # helm 打包
helm package # 启动本地helm 端口8879
helm serve helm delete --purge

10-Helm的更多相关文章

  1. kubernetes实战(十):k8s使用Helm安装harbor

    1.基本概念 对于复杂的应用中间件,需要设置镜像运行的需求.环境变量,并且需要定制存储.网络等设置,最后设计和编写Deployment.Configmap.Service及Ingress等相关yaml ...

  2. Helm 3 使用 harbor 作为仓库存储 charts

    简介 本文讲述的是调教 Helm 3 和 harbor 1.6+ 的经验,从 helm2 更新到 helm 3 并且将 charts 推送到 harbor 中进行存储,移除了原先的 helm serv ...

  3. [转帖]Helm 3 使用 harbor 作为仓库存储 charts

    Helm 3 使用 harbor 作为仓库存储 charts https://www.cnblogs.com/innerpeacez/p/11252198.html 之前需要 使用tiller 现在貌 ...

  4. Kubernetes K8S之Helm部署、使用与示例

    Kubernetes K8S之Helm部署.使用.常见操作与示例 主机配置规划 服务器名称(hostname) 系统版本 配置 内网IP 外网IP(模拟) k8s-master CentOS7.7 2 ...

  5. ASP.NET Core on K8S深入学习(10)K8S包管理器Helm

    本篇已加入<.NET Core on K8S学习实践系列文章索引>,可以点击查看更多容器化技术相关系列文章. 一.关于Helm 1.1 为何需要Helm? 虽然K8S能够很好地组织和编排容 ...

  6. 正式开放 | 阿里云 10 亿级镜像服务正式支持 Helm Charts,云原生交付再加速!

    作者 | 阿里巴巴高级开发工程师 谢于宁(予栖) 2018 年 6 月,Helm 正式加入了 CNCF 孵化项目: 2018 年 8 月,据 CNCF 的调研表明,有百分之六十八的开发者选择了 Hel ...

  7. Helm学习笔记

    Helm学习笔记 Helm 是 Kubernetes 生态系统中的一个软件包管理工具.本文将介绍 Helm 中的相关概念和基本工作原理,并通过一个具体的示例学习如何使用 Helm 打包.分发.安装.升 ...

  8. helm 持久化部署ingres

    Ingress 是一种 Kubernetes 资源,也是将 Kubernetes 集群内服务暴露到外部的一种方式.本文将讲一讲如何用 Helm 在 Kubernetes 集群中部署 Ingress,并 ...

  9. Helm - Kubernetes服务编排的利器

    Helm介绍 在Kubernetes中部署容器云应用(容器或微服务编排)是一项有挑战性的工作,Helm就是为了简化在Kubernetes中安装部署容器云应用的一个客户端工具.通过Helm能够帮助开发者 ...

  10. Kubernetes系列之Helm介绍篇

    本次系列使用的所需部署包版本都使用的目前最新的或最新稳定版,安装包地址请到公众号内回复[K8s实战]获取 介绍 Helm 是 Deis 开发的一个用于 Kubernetes 应用的包管理工具,主要用来 ...

随机推荐

  1. 移动IM开发指南1:如何进行技术选型

    <移动IM开发指南>系列文章将会介绍一个IM APP的方方面面,包括技术选型.登陆优化等.此外,本文作者会结合他在网易云信多年iOS IM SDK开发的经验,深度分析实际开发中的各种常见问 ...

  2. php抽奖概率程序

    抽奖概率思想: 1.给每一个奖项设置要给概率数,如下面所有奖品综合设置为100,iphone5s是5,也就是5% 2.然后通过php生成随机数函数生成一个在总概率之间的随机数 如:抽第一个奖品5s的时 ...

  3. CSS3 入门级

    从刚开始学习的选择器总共有十三种: id class 标签 子代 后代 交集 并集 通配符 伪类 结构 属性 相邻 兄弟 (全当复习,如果有用的话那就正好) div[name=zhang]  这是属性 ...

  4. 08、MySQL—字符串型

    字符串型 1.Char 定长字符:指定长度之后,系统一定会分配指定的空间用于存储数据 基本语法: char(L),L代表字符数(中文与英文字母一样),L长度为0到255 2.Varchar 变长字符: ...

  5. Ruby中的数值

    数值类型 Ruby中所有数值都是Numeric类的子类对象,数值都是不可变对象. 数值类型的继承关系如下: Integer是整数,Float是浮点数类型,Rational是分数. 对于整数,要么是Fi ...

  6. spark入门(三)键值对操作

    1 简述 Spark为包含键值对类型的RDD提供了一些专有的操作.这些RDD被称为PairRDD. 2 创建PairRDD 2.1 在sprk中,很多存储键值对的数据在读取时直接返回由其键值对数据组成 ...

  7. java word转html 报错 org/apache/poi/xwpf/usermodel/IRunBody

    最终解决的办法是修改jar包版本,一定要对应上. <dependency> <groupId>org.apache.poi</groupId> <artifa ...

  8. 分组在re模块中的使用

    import re #search s = "<a>wahaha</a>" #标签语言 html 和 web相关 ret= re.search(" ...

  9. netty实现的RPC框架

    自己手撸了一个nettyRPC框架,希望在这里给有兴趣的同学们做个参考. 要想实现nettyrpc需要了解的技术要点如下: spring的自定义注解.spring的bean的有关初始化. 反射和动态代 ...

  10. C++学习书籍推荐《C++编程思想第二版第一卷》下载

    百度云及其他网盘下载地址:点我 编辑推荐 “经典原版书库”是响应教育部提出的使用原版国外教材的号召,为国内高校的计算机教学度身订造的.<C++编程思想>(英文版第2版)是书库中的一本,在广 ...