Helm chart仓库操作
操作 仓库 Chart Helm
2023-09-14 09:15:18 时间
配置国内存放 chart 仓库的地址
chart图标是存放资源清单的东西,它是存在于远程仓库当中的
- 阿里云仓库(https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts)
- 官方仓库(https://hub.kubeapps.com/charts/incubator)官方 chart 仓库,国内可能无法访问。
- 微软仓库(http://mirror.azure.cn/kubernetes/charts/)这个仓库推荐,基本上官网有的 chart 这里都有,国内可能无法访问。
#添加阿里云的 chart 仓库
[root@master ~]# helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
"aliyun" has been added to your repositories
#添加 bitnami 的 chart 仓库
[root@xianchaomaster1 ~]# helm repo add bitnami https://charts.bitnami.com/bitnami
#更新 chart 仓库
[root@xianchaomaster1 ~]# helm repo update
#查看配置的 chart 仓库有哪些
[root@xianchaomaster1 ~]# helm repo list
#删除 chart 仓库地址
[root@xianchaomaster1 ~]# helm repo remove aliyun
"aliyun" has been removed from your repositories
#从指定 chart 仓库地址搜索 chart
[root@xianchaomaster1 ~]# helm search repo aliyun
搜索和下载Chart
查看阿里云 chart 仓库中的 memcached
[root@master1 ~]# helm search repo aliyun |grep memcached
aliyun/mcrouter 0.1.0 0.36.0 Mcrouter is a
aliyun/memcached 2.0.1 Free & open
查看 chart 信息
[root@master1 ~]# helm show chart aliyun/memcached
apiVersion: v1
description: Free & open source, high-performance, distributed memory object caching
system.
home: http://memcached.org/
icon: https://upload.wikimedia.org/wikipedia/en/thumb/2/27/Memcached.svg/1024pxMemcached.svg.png
下载 chart 包到本地
[root@master1 ~]# helm pull aliyun/memcached
[root@master1 ~]# tar zxvf memcached-2.0.1.tgz
[root@master1 ~]# cd memcached
[root@master1 memcached]# ls
Chart.yaml README.md templates values.yaml
- Chart.yaml: chart 的基本信息,包括版本名字之类
- templates:存放 k8s 的部署资源模板,通过渲染变量得到部署文件
- values.yaml:存放全局变量,templates 下的文件可以调用
[root@xianchaomaster1 memcached]# cd templates/
[root@xianchaomaster1 templates]# ls
_helpers.tpl NOTES.txt pdb.yaml statefulset.yaml svc.yaml
- _helpers.tpl 存放能够复用的模板
- NOTES.txt 为用户提供一个关于 chart 部署后使用说明的文件
相关文章
- iSCSI块存储网络共享基础介绍与实例操作
- 六、数组及其操作《2022 solidity8.+ 版本教程到实战》
- PostgreSQL中的XML操作函数代码
- Python中的字符串操作总结(Python3.6.1版本)详解编程语言
- Create a nice looking chart with CL_GUI_CHART_ENGINE – Part 1 – Chart Designer详解编程语言
- 操作Java操作Redis实现数据过期策略(redisjava过期)
- 时间解决Java操作Redis设置过期时间的方法(redisjava过期)
- GPIO操作在Linux中的实践(linux操作gpio)
- MySQL取出前10条数据的操作技巧(mysql取前10条数据)
- Linux关闭MySQL服务:一步一步操作指南(linux关闭mysql)
- Oracle 关联表更新轻松操作,更简单(oracle 关联表更行)
- 用CMD操作MySQL一步一步指南(cmd访问mysql步骤)
- MySQL多库触发器实现跨库操作的方法(mysql 不同库触发器)
- 利用Oracle中差函数简化数据库操作(oracle中的差的函数)
- PHP图片处理之图片背景、画布操作