首页 > 其他分享 >helm常用命令

helm常用命令

时间:2024-03-22 22:56:17浏览次数:21  
标签:-- list chart release values 常用命令 helm

helm常用命令

helm repo update              # 确定我们可以拿到最新的charts列表
helm show chart bitnami/mysql # 命令简单的了解到这个chart的基本信息
helm show all bitnami/mysql # 获取关于该chart的所有信息。
helm list # (或 helm ls) 命令会列出所有可被部署的版本。
helm uninstall # 命令卸载你的版本,它将删除和该版本相关的所有相关资源(service、deployment、 pod等等)甚至版本历史。
# helm uninstall 的时候提供 --keep-history 选项, Helm将会保存版本历史。 您可以通过命令查看该版本的信息 helm status mysql-1612624192
# --keep-history 选项会让helm跟踪你的版本(即使你卸载了他们), 所以你可以审计集群历史甚至使用 helm rollback 回滚版本。

helm help # 查看更多的有用的信息,或者在任意命令后添加 -h 选项:helm get -h

# Release 是运行在 Kubernetes 集群中的 chart 的实例。一个 chart 通常可以在同一个集群中安装多次。每一次安装都会创建一个新的 release。以 MySQL chart为例,如果你想在你的集群中运行两个数据库,你可以安装该chart两次。每一个数据库都会拥有它自己的 release 和 release name。
# Helm 安装 charts 到 Kubernetes 集群中,每次安装都会创建一个新的 release。你可以在 Helm 的 chart repositories 中寻找新的 chart。

helm search hub # 如果不进行过滤,会展示所有可用的 charts, 从 Artifact Hub 中查找并列出 helm charts。 Artifact Hub中存放了大量不同的仓库。
helm search repo # 从你添加(使用 helm repo add)到本地 helm 客户端中的仓库中进行查找。该命令基于本地数据进行搜索,无需连接互联网。
helm search hub # 找到公开可用的charts:helm search hub wordpress

helm search repo # 你可以从你所添加的仓库中查找chart的名字
helm repo add brigade https://brigadecore.github.io/charts
helm search repo brigade # Helm 搜索使用模糊字符串匹配算法,所以你可以只输入名字的一部分
helm status # 来追踪 release 的状态,或是重新读取配置信息
helm show values # 可以查看 chart 中的可配置选项,例如 helm show values bitnami/wordpress

helm upgrade # 更新自上次发布以来发生了更改的内容
helm get values # 命令来看看配置值是否真的生效,helm get values happy-panda
helm rollback [RELEASE] [REVISION] # 命令回滚到之前的发布版本。helm rollback happy-panda 1
helm create # 开发你自己的chart,helm create deis-workflow
helm lint # 验证格式是否正确。
helm package # 准备将 chart 打包分发

Chart 管理

helm create <name>                      # Creates a chart directory along with the common files and directories used in a chart.
helm package <chart-path>               # Packages a chart into a versioned chart archive file.
helm lint <chart>                       # Run tests to examine a chart and identify possible issues:
helm show all <chart>                   # Inspect a chart and list its contents:
helm show values <chart>                # Displays the contents of the values.yaml file
helm pull <chart>                       # Download/pull chart 
helm pull <chart> --untar=true          # If set to true, will untar the chart after downloading it
helm pull <chart> --verify              # Verify the package before using it
helm pull <chart> --version <number>    # Default-latest is used, specify a version constraint for the chart version to use
helm dependency list <chart>            # Display a list of a chart’s dependencies:

安装和卸载应用

helm install <name> <chart>                           # Install the chart with a name
helm install <name> <chart> --namespace <namespace>   # Install the chart in a specific namespace
helm install <name> <chart> --set key1=val1,key2=val2 # Set values on the command line (can specify multiple or separate values with commas)
helm install <name> <chart> --values <yaml-file/url>  # Install the chart with your specified values
helm install <name> <chart> --dry-run --debug         # Run a test installation to validate chart (p)
helm install <name> <chart> --verify                  # Verify the package before using it 
helm install <name> <chart> --dependency-update       # update dependencies if they are missing before installing the chart
helm uninstall <name>                                 # Uninstall a release

应用升级和回滚

helm upgrade <release> <chart>                            # Upgrade a release
helm upgrade <release> <chart> --atomic                   # If set, upgrade process rolls back changes made in case of failed upgrade.
helm upgrade <release> <chart> --dependency-update        # update dependencies if they are missing before installing the chart
helm upgrade <release> <chart> --version <version_number> # specify a version constraint for the chart version to use
helm upgrade <release> <chart> --values                   # specify values in a YAML file or a URL (can specify multiple)
helm upgrade <release> <chart> --set key1=val1,key2=val2  # Set values on the command line (can specify multiple or separate valuese)
helm upgrade <release> <chart> --force                    # Force resource updates through a replacement strategy
helm rollback <release> <revision>                        # Roll back a release to a specific revision
helm rollback <release> <revision>  --cleanup-on-fail     # Allow deletion of new resources created in this rollback when rollback fails

列出,添加,移除和升级仓库

helm repo add <repo-name> <url>   # Add a repository from the internet:
helm repo list                    # List added chart repositories
helm repo update                  # Update information of available charts locally from chart repositories
helm repo remove <repo_name>      # Remove one or more chart repositories
helm repo index <DIR>             # Read the current directory and generate an index file based on the charts found.
helm repo index <DIR> --merge     # Merge the generated index with an existing index file
helm search repo <keyword>        # Search repositories for a keyword in charts
helm search hub <keyword>         # Search for charts in the Artifact Hub or your own hub instance

Helm 发布检测

helm list                       # Lists all of the releases for a specified namespace, uses current namespace context if namespace not specified
helm list --all                 # Show all releases without any filter applied, can use -a
helm list --all-namespaces      # List releases across all namespaces, we can use -A
helm -l key1=value1,key2=value2 # Selector (label query) to filter on, supports '=', '==', and '!='
helm list --date                # Sort by release date
helm list --deployed            # Show deployed releases. If no other is specified, this will be automatically enabled
helm list --pending             # Show pending releases
helm list --failed              # Show failed releases
helm list --uninstalled         # Show uninstalled releases (if 'helm uninstall --keep-history' was used)
helm list --superseded          # Show superseded releases
helm list -o yaml               # Prints the output in the specified format. Allowed values: table, json, yaml (default table)
helm status <release>           # This command shows the status of a named release.
helm status <release> --revision <number>   # if set, display the status of the named release with revision
helm history <release>          # Historical revisions for a given release.
helm env                        # Env prints out all the environment information in use by Helm.

下载发布信息

helm get all <release>      # A human readable collection of information about the notes, hooks, supplied values, and generated manifest file of the given release.
helm get hooks <release>    # This command downloads hooks for a given release. Hooks are formatted in YAML and separated by the YAML '---\n' separator.
helm get manifest <release> # A manifest is a YAML-encoded representation of the Kubernetes resources that were generated from this release's chart(s). If a chart is dependent on other charts, those resources will also be included in the manifest.
helm get notes <release>    # Shows notes provided by the chart of a named release.
helm get values <release>   # Downloads a values file for a given release. use -o to format output

插件管理

helm plugin install <path/url1>     # Install plugins
helm plugin list                    # View a list of all installed plugins
helm plugin update <plugin>         # Update plugins
helm plugin uninstall <plugin>      # Uninstall a plugin

标签:--,list,chart,release,values,常用命令,helm
From: https://www.cnblogs.com/niuben/p/18090553

相关文章

  • Windows常用命令
    Windows常用命令参考https://www.uc23.net/command/msdos/基本操作基础Win+R打开运行窗口cmd打开命令行工具属性设置右键cmd标题栏错误:不是内部或外部命令,也不是可运行的程序或批处理文件。;原因:命令不存在或者环境变量未配置命令不区分大小写参数包括空格的时候,需......
  • Linux常用命令
    Linux常用命令参考资料(菜鸟和Linux系统简介)https://www.runoob.com/linux/linux-file-attrpermission.htmlhttp://c.biancheng.net/linux_tutorial/10/基本技能快捷键和命令Tab键补全命令和目录(自动提示),只有唯一匹配的时候才能完全补全Shift+Insert粘贴Alt+Insert......
  • 常用命令 ---tail-cat
    常用命令---tail-cat常用选项tailtail和cat是Linux和类Unix系统中两个常用的文本处理命令,分别用于查看文件的末尾内容和显示整个文件内容。以下是它们的一些常用选项:tail常用选项:1.-nnumber或-number:显示文件末尾的指定行数。例如,tail-n10filename显......
  • 常用命令---less---more
    常用命令---less---more常用选项less和more都是Linux和类Unix系统中的文本阅读工具,主要用于分页查看文件内容。虽然两者都能让用户逐屏查看大文件,但less功能更为强大,支持前后翻页和搜索等功能。下面是它们的一些常用选项:lessmore常用选项:-num或-lines:设置每屏......
  • 常用命令--htpasswd--(网站加密)
    常用命令htpasswd(网站加密)常用选项htpasswd是一个用于创建和管理HTTP基本认证密码文件的命令行工具,通常与ApacheWeb服务器一起使用。以下是htpasswd常用选项的概述:1.c**(create):创建一个新的密码文件。如果文件已存在,c选项会覆盖现有文件。在首次创建密码文件时必......
  • PIP常用命令
    此文章仅供个人记录,非专业人士随笔pip一般位于Python310/Scripts目录下,找到Python的安装目录进去就能找到pip.exepip命令需要在Scripts目录下运行,进入Scripts目录,在路径的位置输入cmd即可;显示当前版本pipshowpillow安装指定版本pipinstallpillow==9.5.0升级到最新版......
  • Nodejs常用命令及解释
    node-启动Node.js程序解释:使用该命令可以直接运行一个Node.js程序,从而执行其中的JavaScript代码。npm-Node.js包管理器命令解释:npm是Node.js的包管理器,可以用来安装、卸载和管理Node.js包。常用的命令有:npminit-初始化一个新的Node.js项目npminsta......
  • [Kyana]常用命令与快捷键汇总
    01|快捷键mpv02|命令LinuxvimDockerportainerdockervolumecreateportainer_datadockerrun-d--nameportainer-p9000:9000-v/var/run/docker.sock:/var/run/docker.sock-vportainer_data:/data--restartalwaysportainer/portainermemosdockerrun-d--na......
  • 常用命令find 细则
    常用命令find细则前言find命令在Linux和Unix系统中被广泛使用,用于在目录树中查找文件,并可以对查找到的文件执行指定的操作。以下是find命令的一些常用选项和用法总结:常用选项1.-name:按照文件名查找文件。2.-iname:按照文件名查找文件,不区分大小写。3.-type:......
  • 常用命令--curl
    常用命令--curlcurl命令是一个利用URL规则在命令行下工作的文件传输工具。它支持文件的上传和下载,所以是综合传输工具,但按传统,习惯称curl为下载工具。作为一款强力工具,curl支持包括HTTP、HTTPS、ftp等众多协议,还支持POST、cookies、认证、从指定偏移处下载部分文件、用户代理字符......