Running kubectl commands Helm post install

2019-07-29 03:01发布

I would like to run some kubectl commands to verify the cluster post install of Helm charts. I could not find any documentation around this. In Helm, theres the concept of showing notes as part of NOTES.txt but doesnt look like you can run any commands at that stage.

Is this currently impossible to do with Helm ?

1条回答
做自己的国王
2楼-- · 2019-07-29 03:12

You can define a job that is executed at a certain point in the lifecycle during helm install. The list of available hooks also contains a post-install hook you are probably looking for. An example can be found in the official documentation.

You basically provide a Kubernetes Job, add necessary helm labels and then also an annotation like this:

  annotations:
    "helm.sh/hook": post-install

In case you are looking for something running on the client side, maybe you can use or create a Helm plugin. There is a list in the official documentation: Helm Plugins. You can find some more by filtering GitHub repositories for the topic helm-plugin.

There are ideas for future development to support Lua for scripting plugins. But the current format will still be supported.

查看更多
登录 后发表回答