如何查看新的 Helm Chart 版本中发生了什么变化

pot*_*ato 13 kubernetes kubernetes-helm

我想看看与之前的版本相比,对 helm 图表所做的更改 - 运行时helm list我看到有 xx 修订 - 有什么方法可以看到差异吗?我知道回滚helm rollback <RELEASE> 0,但只是想知道发生了什么变化

Mat*_*att 21

helm 网站上你可以找到一些插件。其中之一称为helm-diff,它可以生成版本之间的差异。

以下是如何使用该插件:

$ helm diff release -h

This command compares the manifests details of a different releases created from the same chart

It can be used to compare the manifests of

 - release1 with release2
    $ helm diff release [flags] release1 release2
   Example:
    $ helm diff release my-prod my-stage
Run Code Online (Sandbox Code Playgroud)

这里解释如何安装插件。TLDR:如果您使用的 helm 版本 > 2.3.x jest 运行:

helm plugin install https://github.com/databus23/helm-diff
Run Code Online (Sandbox Code Playgroud)

让我知道这可以解决您的问题。如果您还有任何其他问题,我很乐意回答。

  • 好吧,然后使用 [helm diff revision](https://github.com/databus23/helm-diff#revision)。它是同一个插件。 (7认同)