Helm:Kubernetes的包管理器:5:常用命令对比(Helm 2 vs Helm 3)

在这里插入图片描述
Helm 2和Helm 3在使用上还是有些区别的,除了在Helm 3中移除了Tiller,一些常用的命令也发生了变化,在这篇文章中进行简单的整理。

常用命令一览

命令 Helm 2 Helm 3 命令说明区别 命令说明
create create a new chart with the given name
delete - given a release name, delete the release from Kubernetes
dependency manage a chart’s dependencies
fetch - download a chart from a repository and (optionally) unpack it in local directory
get download a named release
history fetch release history
home - displays the location of HELM_HOME
init - initialize Helm on both client and server
inspect - inspect a chart
install install a chart archive
lint examines a chart for possible issues
list list releases
package package a chart directory into a chart archive
plugin add, list, or remove Helm plugins
repo add, list, remove, update, and index chart repositories
reset - uninstalls Tiller from a cluster
rollback roll back a release to a previous revision
search search for a keyword in charts
serve - start a local http web server
status displays the status of the named release
template locally render templates
test test a release
upgrade upgrade a release
verify verify that a chart at the given path has been signed and is valid
version print the client/server version information
env - Helm client environment information
help - Help about any command
pull - download a chart from a repository and (optionally) unpack it in local directory
show - show information of a chart
uninstall - uninstall a release

Helm 3: 不再存在的Helm 2的命令

在前面的文章示例中,我们发现helm init已经在Helm 3中不存在了。类似的共有如下7条命令,在Helm 3中或删除或改名或则功能增强,比如因为Tiller的去除,所以导致了reset命令没有存在的意义,同时init存在仅剩客户端需要设定的功能,所以被去除了。另外诸如fetch命令,而在Helm 3中提供了pull命令予以替代。本来home命令用于显示HELM_HOME环境变量,而在Helm 3中提供env命令可以显示所有的环境变量信息,用增强的功能予以了替换。但是无论如何,总之已经无法在Helm 3中直接使用如下7条命令。

命令 Helm 2 Helm 3 命令说明
delete given a release name, delete the release from Kubernetes
fetch download a chart from a repository and (optionally) unpack it in local directory
home displays the location of HELM_HOME
init initialize Helm on both client and server
inspect inspect a chart
reset uninstalls Tiller from a cluster
serve start a local http web server

Helm 3: 相较与Helm 2新增的命令

相较于Helm 2,从helm --help中获得的信息看到如下5条命令在Helm 3中为新增的命令。

命令 Helm 2 Helm 3 命令说明
env Helm client environment information
help Help about any command
pull download a chart from a repository and (optionally) unpack it in local directory
show show information of a chart
uninstall uninstall a release

稍作分析,会发现如下事实:

  • env是对被删除的命令home的强化
  • pull是对被删除的命令fetch的替换
  • show是对被删除的命令inspect的替换
  • help命令本身在Helm 2时代就可以使用,只是helm --help里面没有显示,算是文档自包含的强化
  • uninstall是功能特性的增强

Helm 3: 命令说明发生变化

由于Tiller的移除,版本显示命令helm version的表述从显示client/server的版本信息变成了显示client的版本信息,类似的发生变化的共有5条命令,到底是文档的变化还是功能性的反映,在后续的文章中将继续通过实例进行进一步的说明。

命令 Helm 2 Helm 3 命令说明区别 Helm 2 命令说明 Helm 3命令说明
get download a named release download extended information of a named release
install install a chart archive install a chart
plugin add, list, or remove Helm plugins install, list, or uninstall Helm plugins
test test a release run tests for a release
version print the client/server version information print the client version information

Helm 3: 其他变化

并不是说helm --help没有变化的,使用上就没有区别,以repo和install为例,在使用上都发生了变化,但是在helm自身提供的帮助信息中却未提供,这些也会在后续的示例的使用中进一步进行说明。

Helm 2 到Helm 3的升级

helm还提供了一个移植的插件,详细可参看:

  • https://github.com/helm/helm-2to3

备注

本文用于对比的Helm 命令取之与Helm 2.8.2和Helm 3.0.0。

参考内容

https://github.com/helm/helm-2to3

你可能感兴趣的:(#,Helm,Helm,2,Helm,3,CNCF,Kubernetes,常用命令)