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. 解决npm install卡住不动的小尴尬

    npm install卡顿问题记录 遇到的问题 npm install -g @angular/cli 安装angular cli工具时,发现进度条一直卡住不动,相信很多朋友也遇到过.原因应该是国内的 ...

  2. 【转】如何在Ubuntu 14.04 LTS上设置Nginx虚拟主机

    介绍 转自http://www.pandacademy.com/%E5%A6%82%E4%BD%95%E5%9C%A8ubuntu-14-04-lts%E4%B8%8A%E8%AE%BE%E7%BD% ...

  3. 经典Java笔试面试题

    面向对象编程(OOP) Java是一个支持并发.基于类和面向对象的计算机编程语言.下面列出了面向对象软件开发的优点: 代码开发模块化,更易维护和修改. 代码复用. 增强代码的可靠性和灵活性. 增加代码 ...

  4. Java:HashMap原理与设计缘由

    前言 Java中使用最多的数据结构基本就是ArrayList和HashMap,HashMap的原理也常常出现在各种面试题中,本文就HashMap的设计与设计缘由作出一一讲解,并解答面试常见的一些问题. ...

  5. redis 是如何做持久化的

    Redis 是一个键值对数据库服务器.基于内存存储数据,它常被用做缓存数据库,用来替代 memcached.官网:https://redis.io/ 什么是持久化? 持久化,指将数据存储到可永久保存的 ...

  6. 工具资源系列之给 windows 虚拟机装个 mac

    众说周知,Mac 很好但也很贵,对一般大众而言,漂亮简洁高颜值,对软件开发者而言,方便省心有点贵. 好到什么程度? 内置大量常用的开发工具,省去了初学者安装配置环境的麻烦,版本控制工具 svn 默认已 ...

  7. CentOS中对MySql的root用户重置密码

    由于一般的修改ini文件来完成无密码登录数据库容易造成较大风险,所以使用修改启动服务参数的方式来更新user表,达到无密码登陆的目的. 1.关闭系统下运行的mysql服务 (1)杀掉进程号达到关闭目的 ...

  8. Pandas Series 与 DataFrame 数据创建

    >>> import pandas as pd >>> import numpy as np >>> print(np.__version__), ...

  9. Yii basic 模板支持连接多数据库

    1.首先修改db配置文件,修改格式如下: return [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:hos ...

  10. Promise原理探究及实现

    前言 作为ES6处理异步操作的新规范,Promise一经出现就广受欢迎.面试中也是如此,当然此时对前端的要求就不仅仅局限会用这个阶段了.下面就一起看下Promise相关的内容. Promise用法及实 ...