一、chart的结构

(1)更改helm为阿里云仓库源

[root@master helm]# helm repo remove stable
"stable" has been removed from your repositories [root@master helm]# helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
"stable" has been added to your repositories [root@master helm]# helm repo list
NAME URL
local http://127.0.0.1:8879/charts
incubator https://kubernetes-charts-incubator.storage.googleapis.com/
stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts #更新
[root@master helm]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "incubator" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈

(2)

[root@master helm]# pwd
/root/manifests/helm
[root@master helm]# helm fetch stable/redis #获取chart,会得到一个压缩包 [root@master helm]# tar zxf redis-6.4..tgz [root@master helm]# ls
redis redis-6.4..tgz tiller-rbac.yaml #chart目录结构
[root@master helm]# tree redis
redis
├── Chart.yaml #chart元数据描述信息(版本...)
├── ci
│ ├── default-values.yaml
│ ├── dev-values.yaml
│ ├── production-values.yaml
│ ├── redisgraph-module-values.yaml
│ └── redis-lib-values.yaml
├── README.md
├── templates #资源定义清单模板文件
│ ├── configmap.yaml
│ ├── health-configmap.yaml
│ ├── _helpers.tpl
│ ├── metrics-deployment.yaml
│ ├── metrics-prometheus.yaml
│ ├── metrics-svc.yaml
│ ├── networkpolicy.yaml
│ ├── NOTES.txt
│ ├── redis-master-statefulset.yaml
│ ├── redis-master-svc.yaml
│ ├── redis-rolebinding.yaml
│ ├── redis-role.yaml
│ ├── redis-serviceaccount.yaml
│ ├── redis-slave-deployment.yaml
│ ├── redis-slave-svc.yaml
│ └── secret.yaml
├── values-production.yaml
└── values.yaml #为 templates中的资源定义清单设置自定义属性值
#其他目录结构
requirements.yaml #当前chart是否依赖其他chart,这个文件是可选的。
charts/ #里面放置的是当前chart所要依赖的其他chart,这个是可选的。 #可以通过chart官方手册,来了解以上每项的详细含义:
https://docs.helm.sh/developing_charts/#charts

二、用helm生成基础chart示例性文件

(1)

[root@master helm]# helm create myapp
Creating myapp [root@master helm]# ls |grep myapp
myapp [root@master helm]# tree myapp/
myapp/
├── charts
├── Chart.yaml
├── templates
│   ├── deployment.yaml
│   ├── _helpers.tpl
│   ├── ingress.yaml
│   ├── NOTES.txt
│   └── service.yaml
└── values.yaml #可以自己修改每个文件里的值,然后做语法检查
[root@master helm]# helm lint myapp
==> Linting myapp
[INFO] Chart.yaml: icon is recommended chart(s) linted, no failures #打包
[root@master helm]# helm package myapp/
Successfully packaged chart and saved it to: /root/manifests/helm/myapp-0.0..tgz [root@master helm]# ls |grep myapp
myapp
myapp-0.0..tgz

(2)启动本地仓库,并应用

[root@master helm]# helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com
local http://127.0.0.1:8879/charts #启动本地仓库
[root@master helm]# helm serve
Regenerating index. This may take a moment.
Now serving you on 127.0.0.1: #查看,可见myapp已经自动保存在仓库中了
[root@master ~]# helm search myapp
NAME CHART VERSION APP VERSION DESCRIPTION
local/myapp 0.0. 1.0 A Helm chart for Kubernetes myapp chart #如果定义的没问题,就可以部署了
[root@master ~]# helm install --name myapp1 local/myapp #删除
[root@master ~]# helm delete --purge myapp1

三、EFK日志系统

(1)添加incubator源

[root@master ~]# helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
"incubator" has been added to your repositories [root@master ~]# helm repo list
NAME URL

k8s-创建自定义chart及部署efk-二十五的更多相关文章

  1. Kubernetes 学习25 创建自定义chart及部署efk日志系统

    一.概述 1.我们说过在helm架构中有这么几个关键组件,helm,tiller server,一般托管运行于k8s之上,helm能够通过tiller server在目标k8s集群之上部署应用程序,而 ...

  2. K8s helm 创建自定义Chart

    # 删除之前创建的 chart helm list helm delete --purge redis1 # 创建自定义 chart myapp cd ~/helm helm create myapp ...

  3. JAVA之旅(二十五)——文件复制,字符流的缓冲区,BufferedWriter,BufferedReader,通过缓冲区复制文件,readLine工作原理,自定义readLine

    JAVA之旅(二十五)--文件复制,字符流的缓冲区,BufferedWriter,BufferedReader,通过缓冲区复制文件,readLine工作原理,自定义readLine 我们继续IO上个篇 ...

  4. WCF技术剖析之二十五: 元数据(Metadata)架构体系全景展现[元数据描述篇]

    原文:WCF技术剖析之二十五: 元数据(Metadata)架构体系全景展现[元数据描述篇] 在[WS标准篇]中我花了很大的篇幅介绍了WS-MEX以及与它相关的WS规范:WS-Policy.WS-Tra ...

  5. C#学习基础概念二十五问

    C#学习基础概念二十五问 1.静态变量和非静态变量的区别?2.const 和 static readonly 区别?3.extern 是什么意思?4.abstract 是什么意思?5.internal ...

  6. [转载]Windows Server 2008 R2 之二十五AD RMS信任策略

    原文地址:Windows Server 2008 R2 之二十五AD RMS信任策略作者:从心开始 可以通过添加信任策略,让 AD RMS 可以处理由不同的 AD RMS 群集进行权限保护的内容的授权 ...

  7. 使用Typescript重构axios(二十五)——文件上传下载进度监控

    0. 系列文章 1.使用Typescript重构axios(一)--写在最前面 2.使用Typescript重构axios(二)--项目起手,跑通流程 3.使用Typescript重构axios(三) ...

  8. Bootstrap <基础二十五>警告(Alerts)

    警告(Alerts)以及 Bootstrap 所提供的用于警告的 class.警告(Alerts)向用户提供了一种定义消息样式的方式.它们为典型的用户操作提供了上下文信息反馈. 您可以为警告框添加一个 ...

  9. VMware vSphere 服务器虚拟化之二十五 桌面虚拟化之终端服务池

    VMware vSphere 服务器虚拟化之二十五 桌面虚拟化之终端服务池 终端服务池是指由一台或多台微软终端服务器提供服务的桌面源组成的池.终端服务器桌面源可交付多个桌面.它具有以下特征: 1.终端 ...

  10. Bootstrap入门(二十五)JS插件2:过渡效果

    Bootstrap入门(二十五)JS插件2:过渡效果 对于简单的过渡效果,只需将 transition.js 和其它 JS 文件一起引入即可.如果你使用的是编译(或压缩)版的bootstrap.js  ...

随机推荐

  1. hdu1385Minimum Transport Cost(最短路变种)

    题目链接: huangjing 思路: 输出路径的最短路变种问题..这个题目在于多组询问.那么个人认为用floyd更加稳妥一点.还有就是在每一个城市都有过路费,所以在floyd的时候更改一下松弛条件就 ...

  2. Wide & Deep Learning Model

    Generalized linear models with nonlinear feature transformations (特征工程 + 线性模型) are widely used for l ...

  3. Matlab中配置VLFeat

    在VLFeat官网上是这么介绍VLFeat的:VLFeat开源库实现了很多著名的机器视觉算法,如HOG, SIFT, MSER, k-means, hierarchical k-means, aggl ...

  4. Win10 LTSB版本安装

    win10 LTSB版本可以看作是 win10的阉割版,没有了几乎用不到还占资源的应用商店.小娜.没有了 EDGE只有IE11....云云 下载地址  https://msdn.itellyou.cn ...

  5. [WASM] Access WebAssembly Memory Directly from JavaScript

    While JavaScript has a garbage-collected heap, WebAssembly has a linear memory space. Nevertheless u ...

  6. 【LeetCode】Generate Parentheses 解题报告

    [题目] Given n pairs of parentheses, write a function to generate all combinations of well-formed pare ...

  7. 哈理工2015 暑假训练赛 zoj 2976 Light Bulbs

    MS    Memory Limit:65536KB    64bit IO Format:%lld & %llu SubmitStatusid=14946">Practice ...

  8. weexapp 开发流程(一)开发环境配置

    1.创建项目 weexpack create weexapp 2.安装必要插件 npm i jwt-simple vue-resource vue-router vuex vuex-router-sy ...

  9. effctive C++ 读书笔记 条款 16

    条款16 成对使用new和delete时要採取同样形式 #include <iostream> #include <string> using namespace std; / ...

  10. 文件宝局域网传输/播放功能Windows10系统经验贴(感谢文件宝用户@卡卡罗特 和@24K 純情)

    本文由文件宝用户@卡卡罗特 和@24K 純情 两位用户提供,感谢二位. 先分享一个软件开发者的博客,http://www.cnblogs.com/flychen/也许里面的说明就能解决你的问题. 以下 ...