Helm系列-Helm命令之Helm repo仓库管理

这篇具有很好参考价值的文章主要介绍了Helm系列-Helm命令之Helm repo仓库管理。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1 功能

该命令由于chart仓库交互的多条子命令组成,用来添加、列出、删除、更新和索引chart仓库。

2 参数

helm repo -h

This command consists of multiple subcommands to interact with chart repositories.

It can be used to add, remove, list, and index chart repositories.

Usage:
  helm repo [command]

Available Commands:
  add         add a chart repository
  index       generate an index file given a directory containing packaged charts
  list        list chart repositories
  remove      remove a chart repository
  update      update information of available charts locally from chart repositories

Flags:
  -h, --help   help for repo

Global Flags:
      --add-dir-header                   If true, adds the file directory to the header
      --alsologtostderr                  log to standard error as well as files
      --debug                            enable verbose output
      --kube-context string              name of the kubeconfig context to use
      --kubeconfig string                path to the kubeconfig file
      --log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log-dir string                   If non-empty, write log files in this directory
      --log-file string                  If non-empty, use this log file
      --log-file-max-size uint           Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
      --logtostderr                      log to standard error instead of files (default true)
  -n, --namespace string                 namespace scope for this request
      --registry-config string           path to the registry config file (default "/root/.config/helm/registry.json")
      --repository-cache string          path to the file containing cached repository indexes (default "/root/.cache/helm/repository")
      --repository-config string         path to the file containing repository names and URLs (default "/root/.config/helm/repositories.yaml")
      --skip-headers                     If true, avoid header prefixes in the log messages
      --skip-log-headers                 If true, avoid headers when opening log files
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

Use "helm repo [command] --help" for more information about a command.

3 从父命令继承的命令

      --debug                       enable verbose output
      --kube-apiserver string       the address and the port for the Kubernetes API server
      --kube-as-group stringArray   group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --kube-as-user string         username to impersonate for the operation
      --kube-ca-file string         the certificate authority file for the Kubernetes API server connection
      --kube-context string         name of the kubeconfig context to use
      --kube-token string           bearer token used for authentication
      --kubeconfig string           path to the kubeconfig file
  -n, --namespace string            namespace scope for this request
      --registry-config string      path to the registry config file (default "~/.config/helm/registry.json")
      --repository-cache string     path to the file containing cached repository indexes (default "~/.cache/helm/repository")
      --repository-config string    path to the file containing repository names and URLs (default "~/.config/helm/repositories.yaml")

4 使用案例

4.1 helm repo add

4.1.1 功能

新增chart仓库

4.1.2 语法格式

helm repo add [NAME] [URL]

4.1.3 案例

# helm repo add test-repo http://mirror.kaiyuanshe.cn/kubernetes/charts/
"test-repo" has been added to your repositories

4.2 helm repo list

4.2.1 功能

列举chart仓库

4.2.2 语法格式

helm repo list [flags]

4.2.3 案例

# helm repo list
   NAME      URL
2 test-repo http://mirror.kaiyuanshe.cn/kubernetes/charts/

4.3 helm repo update

4.3.1 功能

从chart仓库中更新本地可用chart的信息,更新从各自chart仓库中获取的有关chart的最新信息。信息会缓存在本地,被诸如'helm search'等命令使用

4.3.2 语法格式

helm repo update [flags]

4.3.3 案例

# helm repo update test-repo

返回如下结果:

Hang tight while we grab the latest from your chart repositories... 
...Successfully got an 
update from the "test-repo" chart repository Update Complete. ⎈Happy Helming!⎈

4.4  helm repo remove 

4.4.1 功能

删除chart仓库

4.4.2 语法格式

helm repo update [flags]

4.4.3 案例

使用 remove 命令可以删除一个或多个仓库:

helm repo remove test-tepo

返回如下结果:

"test-repo" has been removed from your repositories

4.5 helm repo index 

4.5.1 功能

基于包含打包chart的目录,生成索引文件

4.5.2 语法格式

读取当前目录,并根据找到的 chart 生成索引文件。

这个工具用来为chart仓库创建一个'index.yaml'文件,使用'--url'参数创建一个chart的绝对URL。

要合并生成的索引和已经存在的索引文件时,使用'--merge'参数。在这个场景中,在当前目录中找到的chart会合并到已有索引中, 本地chart的优先级高于已有chart。

helm repo index [DIR] [flags]

4.5.3 案例

如果你想使用指定目录来做为 Helm Repository 的存储目录,可以加上 --repo-path 参数:

​$ helm serve --address 192.168.100.211:8879 --repo-path /data/helm/repository/ --url http://192.168.100.211:8879/charts/

通过 helm repo index 命令将 Chart 的 Metadata 记录更新在 index.yaml 文件中:

# 更新 Helm Repository 的索引文件
$ cd /home/k8s/.helm/repository/local
$ helm repo index --url=http://192.168.100.211:8879 .

完成启动本地 Helm Repository Server 后,就可以将本地 Repository 加入 Helm 的 Repo 列表。

​$ helm repo add local http://127.0.0.1:8879
"local" has been added to your repositories

现在再次查找 mychart 包,就可以搜索到了。文章来源地址https://www.toymoban.com/news/detail-534763.html

$ helm repo update
$ helm search mychart
NAME CHART VERSION APP VERSION DESCRIPTION
local/mychart 0.1.0 1.0 A Helm chart for Kubernetes

到了这里,关于Helm系列-Helm命令之Helm repo仓库管理的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • k8s包管理工具helm简介及基本使用

     helm是k8s的包管理工具,类似于centos 的yum;  当前版本有helm2、helm3 相对来说helm3功能更加完善,使用更加方便 主要作用是相较于传统的k8s部署应用需要手工编排yaml文件(比如Deployment.yml、service.yml、ingress.yml等),使用helm可以快速部署应用。 helm3与helm2 的区别在于helm3删除了

    2024年02月14日
    浏览(27)
  • kubectl&kubelet&rancher&helm&kubeadm这几个命令行工具是什么关系?

    在最近学习k8s的过程中,发现kubectlkubeletrancherhelmkubeadm这几个命令怎么在交错使用,他们究竟是什么关系?他们分别应该在什么情况下使用呢?这里我进行了简单的总结,做个区分。 Kubectl 是一款用于管理和操作 Kubernetes 集群的命令行工具,是Kubernetes 的一个标准 CLI,具备可

    2024年02月02日
    浏览(37)
  • 云原生之深入解析Kubernetes应用包管理器Helm的保姆级教程和实战

    ① 什么是 Helm? 我们可以将 Helm 看作 Kubernetes 下的 apt-get/yum,Helm 是 kubernetes 的包管理器,Helm 仓库里面只有配置清单文件,而没有镜像,镜像还是由镜像仓库来提供,比如 hub.docker.com、私有仓库。 想了解更多 Helm 的信息,请参考:官方文档。 ② Helm 架构 ③ Helm 安装 可以到

    2024年02月10日
    浏览(46)
  • Kubernetes 的包管理器工具—— Helm 使用指南:打包、安装和升级 Kubernetes 中的应用程序

    作者:禅与计算机程序设计艺术 Helm 是 Kubernetes 的包管理器工具。Helm 可以帮助用户管理复杂的 Kubernetes 应用,通过 Charts 来打包、安装和升级 Kubernetes 中的应用程序。 1.1.1 Helm 安装 Helm 的下载及安装方式可以查看 官方文档。 1.1.2 Helm 操作命令 Helm 提供了多个子命令用于管理

    2024年02月09日
    浏览(37)
  • 【笔记】Helm-3 主题-6 Chart仓库指南

    Chart仓库指南 本节介绍如何创建和使用chart仓库。在高层级中,chart仓库是打包的chart存储和分享的位置。 社区的Helm chart仓位于 Artifact Hub ,欢迎加入。不过Helm也可以创建并运行您自己的chart仓库。该指南将介绍如何操作。 Artifact Hub 先决条件 先阅读 快速开始 阅读 Charts 文档

    2024年01月18日
    浏览(30)
  • Helm Dashboard — Kubernetes 中管理 Helm 版本的 GUI

    Helm Dashboard 通过提供图形用户界面,使在 Kubernetes 中管理 Helm 版本变得更加容易,这是许多开发人员所期望的。它可用于在 Kubernetes 中创建、部署和更新应用程序的版本,并跟踪其状态。 本文将探讨 Helm Dashboard 提供的特性和优势,并解释如何使用它来促进 Kubernetes 应用程序

    2024年01月20日
    浏览(40)
  • 【Harbor作为Chart仓库】Helm离线部署AWX1.0.0

    1.Helm是什么?   Helm 帮助管理 Kubernetes 应用—— Helm Chart,即使是最复杂的 Kubernetes 应用程序,都可以帮助您定义,安装和升级。具有复杂性管理、易于升级、分发简单、回滚优点。可以简单理解为k8s的yum源、maven后端依赖库、nexus前端依赖库等。 2.Chart是什么?   Chart是

    2024年01月20日
    浏览(33)
  • k8s使用helm部署Harbor镜像仓库并启用SSL

    参照:https://zhaoll.blog.csdn.net/article/details/128155767 有多种安装方式,根据自己的k8s版本选择合适的helm版本 参考:https://blog.csdn.net/qq_30614345/article/details/131669319 我们这里使用helm安装harbor,项目地址:https://github.com/goharbor/harbor-helm (1)拉取项目文件 (2)解压并修改配置 tar -z

    2024年02月16日
    浏览(32)
  • 使用k8s helm离线部署spark-operator(私有仓库)

    将制作的镜像上传到目的机器中,加载镜像 打标签其中xxxx.xxx/xx/为私有仓库的地址 将制作好的镜像推到私有仓库中 Github地址: 下载上传到机器中 解压spark-operator-1.1.27.tgz,修改values.yaml内容,修改副本数量为3、镜像源、利用伪亲和性使得三个副本在三台机器上。 修改Chart

    2024年02月09日
    浏览(30)
  • Docker与Helm包管理

    Docker和Helm是现代容器化和微服务架构中的重要组成部分。Docker是一个开源的应用容器引擎,用于自动化应用程序的部署、创建、运行和管理。Helm是Kubernetes的包管理器,用于简化Kubernetes应用程序的部署和管理。在本文中,我们将深入探讨Docker和Helm的背景、核心概念、算法原

    2024年03月17日
    浏览(25)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包