0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

Helm仓库管理常用配置

马哥Linux运维 ? 来源:博客园 ? 2025-06-07 09:27 ? 次阅读
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

概述

Helm 仓库(Repository)是存储 Helm 图表(Chart)的地方,类似于软件包管理器的仓库(如 apt、yum 仓库)。

Helm 仓库是一个 HTTP 服务器,用于存储和共享 Helm Chart 的压缩包(.tgz 文件)及相关索引文件(index.yaml)。
索引文件(index.yaml)记录了仓库中所有 Chart 的元数据(名称、版本、描述等),供 Helm 客户端查询和下载。

常见的仓库类型

? 官方仓库:Helm 官方维护的仓库(已归档,现推荐使用Artifact Hub查找社区 Chart)。

? 社区仓库:如Bitnami、Jetstack等组织提供的仓库。

? 私有仓库:企业内部自建的仓库,用于管理私有 Chart。

常用的helm仓库

? bitnami:https://charts.bitnami.com/bitnami

? grafana:https://grafana.github.io/helm-charts

? prometheus:https://prometheus-community.github.io/helm-charts

? harbor:https://helm.goharbor.io

? minio-operator:https://operator.min.io

Helm仓库管理常用配置

添加仓库

将仓库地址添加到 Helm 客户端的本地配置中

|   |  |
|---| --- |
|   |# 语法 |
|   |helm repoadd[仓库名称] [仓库地址]|
|  |   |
|   |# 示例 |
|   |[root@master ~]# helm repo add prometheus https://prometheus-community.github.io/helm-charts |
|   |"prometheus"hasbeenaddedto your repositories|
|  | [root@master ~]# helm repo add grafana https://grafana.github.io/helm-charts |
|   |"grafana"hasbeenaddedto your repositories|

更新仓库索引

Helm 客户端需要定期更新仓库索引,以获取最新的 Chart 列表和版本信息。

|  |  |
|--- | --- |
|  |[root@master~]# helm repoupdate|
|  |Hang tight while we grab the latestfromyour chart repositories...|
|  |...Successfully got anupdatefromthe "grafana" chart repository|
|  |...Unabletogetanupdatefromthe "prometheus" chart repository (https://prometheus-community.github.io/helm-charts):|
|  |read tcp [fdbdff:318:3ebb:26f3:26ff:6026]:39074->[2606:50c0:8001::153]:443: read: connection resetbypeer|
|  |UpdateComplete. ?Happy Helming!?|

列出本地仓库

查看当前配置的所有仓库及其地址。

|   |   |
| --- | --- |
|   | [root@master ~]# helm repo list |
|   | NAME      URL |
|   | prometheus   https://prometheus-community.github.io/helm-charts |
|   | grafana     https://grafana.github.io/helm-charts |

删除仓库(Remove Repository)

从本地配置中移除不再需要的仓库。

|   |   |
| --- | --- |
|   |#语法 |
|   | helm reporemove[仓库名称] |
|   |   |
|   |# 示例 |
|   | [root@master ~]# helm repo remove grafana |
|   |"grafana"has been removedfromyour repositories |
|   | [root@master ~]# helm repo list |
|   | NAME      URL |
|   | prometheus   https://prometheus-community.github.io/helm-charts |

搜索仓库中的 Chart(Search Charts)

从仓库中搜索符合条件的 Chart,支持模糊匹配。

|   |   |
| --- | --- |
|   |# 语法 |
|   | helm search repo [关键词] |
|   |   |
|   |# 示例 |
|   | [root@master ~]# helm search repo grafana |
|   | NAME                  CHART VERSION  APP VERSION   DESCRIPTION |
|   | grafana/grafana             9.2.2      12.0.1     The leading toolforquerying and visualizing t... |
|   | grafana/grafana-agent          0.42.0     v0.42.0     Grafana Agent |
|   | grafana/grafana-agent-operator     0.5.1      0.44.2     A Helm chartforGrafana Agent Operator |
|   | grafana/grafana-operator        v5.18.0     v5.18.0     Helm chartforthe Grafana Operator |
|   | grafana/grafana-sampling        1.1.5      v1.7.5     A Helm chartfora layered OTLPtailsampling a... |

查看指定仓库中Chart的版本

|   |   |
| --- | --- |
|   |# 语法 |
|   | helm search repo [chart名称] --versions |
|   |   |
|   |# 示例 |
|   | [root@master ~]# helm search repo prometheus/kube-prometheus-stack --versions |
|   | NAME                  CHART VERSION  APP VERSION   DESCRIPTION |
|   | prometheus/kube-prometheus-stack    72.9.1     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.9.0     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.8.0     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.7.0     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.6.4     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.6.3     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.6.2     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.6.1     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.5.3     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.5.2     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.5.1     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.5.0     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.4.0     v0.82.2     kube-prometheus-stack collects Kubernetes manif... |
|   | prometheus/kube-prometheus-stack    72.3.1     v0.82.0     kube-prometheus-stack collects Kubernetes manif... |

拉取远程仓库的chart

|   |   |
| --- | --- |
|   | # 语法,--version对应的是chart version,--untar自动解压, |
|   | #--destination:指定下载的 Chart 文件(.tgz)保存的目标目录(默认当前目录)。 |
|   | #--repo[仓库URL]  直接从指定 URL 下载 Chart,而不使用已添加的仓库名称。 |
|   | helm pull[chart名出]--version[版本号]--untar--destination[/path]--repo[仓库URL]|
|   |   |
|   | # 示例 |
|   |[root@master ~]# helm pull prometheus/kube-prometheus-stack--version72.9.0|
|   |[root@master ~]# ll kube-prometheus-stack-72.9.0.tgz|
|   | -rw-r--r--1root root814664Jun 314:45kube-prometheus-stack-72.9.0.tgz |

私有仓库相关命令

创建仓库索引文件

为本地 Chart 目录生成 index.yaml,用于搭建私有仓库。

|   |   |
| --- | --- |
|   | helm repo index[目录路径]--url[仓库URL]|

推送 Chart 到私有仓库

|   |   |
| --- | --- |
|   | helm push[Chart路径][仓库名称]|

链接:https://www.cnblogs.com/huangSir-devops/p/18908212

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 服务器
    +关注

    关注

    13

    文章

    9826

    浏览量

    88224
  • HTTP
    +关注

    关注

    0

    文章

    526

    浏览量

    33660
  • 软件包
    +关注

    关注

    0

    文章

    111

    浏览量

    11950

原文标题:5分钟学会Helm仓库高效管理:命令行技巧全解析

文章出处:【微信号:magedu-Linux,微信公众号:马哥Linux运维】欢迎添加关注!文章转载请注明出处。

收藏 人收藏
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

    评论

    相关推荐
    热点推荐

    Kubernetes Helm入门指南

    Helm 是 Kubernetes 的包管理工具,它允许开发者和系统管理员通过定义、打包和部署应用程序来简化 Kubernetes 应用的管理工作。
    的头像 发表于 04-30 13:42 ?2347次阅读
    Kubernetes <b class='flag-5'>Helm</b>入门指南

    RFID智能仓库管理方案

    本帖最后由 azsxdcfv1871514 于 2013-1-6 14:56 编辑 仓库管理在企业的整个管理流程中起着非常重要的作用,如果不能保证及时准确的进货、库存控制和发货,将会给企业带来
    发表于 04-12 10:57

    仓库管理小程序求助

    各位大侠,我刚入门labview,想用其作一个小小的仓库入库管理程序,请帮帮忙啊。具体内容如下:两个EXCEL工作簿,分别为《仓库清单》和《台帐》,说明一下:《仓库清单》中分《入库记录
    发表于 09-09 20:21

    【GoKit申请】仓库管理系统

    申请理由:当今的仓库管理需求不再以单纯的仓储为核心,而更多的关注货品的准确流动、全自动化,其目的是保持库存的合理科学流通,降低人力资源需求,减少人为操作错误,为企业创造更大的价值。采用物联网技术实现
    发表于 09-22 09:55

    【DNA Kit申请】仓库管理系统

    申请理由:当今的仓库管理需求不再以单纯的仓储为核心,而更多的关注货品的准确流动、全自动化,其目的是保持库存的合理科学流通,降低人力资源需求,减少人为操作错误,为企业创造更大的价值。采用物联网技术实现
    发表于 09-29 09:59

    使用Helm 在容器服务k8s集群一键部署wordpress

    新的chartchart打包成tgz格式上传chart到chart仓库或从仓库中下载chart在Kubernetes集群中安装或卸载chart管理Helm安装的chart的发布周期
    发表于 03-29 13:38

    如何配置Yum仓库

    第1步:进入到/etc/yum.repos.d/目录中 第2步:使用Vim编辑器创建一个名为rhel7.repo的新配置文件 第3步:按配置参数的路径挂载光盘,并把光盘挂载信息写入到/etc
    发表于 04-28 17:28 ?2039次阅读

    RFID仓库管理系统为传统的仓库管理带来了变革

    一.系统背景 传统的仓库管理,以纸张文件为基础的系统来记录、追踪进出的货物,完全由人工操作仓库内部的管理,因此仓库
    发表于 12-04 14:48 ?838次阅读

    Helm Kubernetes包管理

    helm.zip
    发表于 04-27 14:25 ?2次下载
    <b class='flag-5'>Helm</b> Kubernetes包<b class='flag-5'>管理</b>器

    Helm常用命令(chart安装、升级、回滚、卸载等操作)

    Helm 针对 Kubernetes 的 Helm管理器。
    的头像 发表于 09-13 14:54 ?7701次阅读

    如何开发一个helm chart

    使用helmfile时,我们首先得了解helm的使用,以及如何开发一个helm chart。
    的头像 发表于 05-16 09:28 ?957次阅读

    Helm的一些概念及用法

    应用,使用?Helm?(https://helm.sh)是一个很不错的选择,它具备如下的能力: 简化部署?:Helm允许使用单个命令轻松部署和管理应用程序,从而简化了整个部署过程; 高
    的头像 发表于 05-30 09:51 ?1557次阅读
    <b class='flag-5'>Helm</b>的一些概念及用法

    Helm部署MinIO集群

    Helm部署MinIO集群
    的头像 发表于 12-03 09:44 ?1118次阅读
    <b class='flag-5'>Helm</b>部署MinIO集群

    Kubernetes包管理工具Helm的安装和使用

    Helm 可以帮助我们管理 Kubernetes 应用程序 - Helm Charts 可以定义、安装和升级复杂的 Kubernetes 应用程序,Charts 包很容易创建、版本管理
    的头像 发表于 03-13 16:06 ?1054次阅读

    Helm详细介绍和使用

    Helm是Kubernetes 应用的包管理工具,主要用来管理 Charts,类似Linux系统的yum。
    的头像 发表于 06-17 13:56 ?419次阅读