Running kubectl commands Helm post install

风格不统一 提交于 2019-12-11 10:46:21

问题


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:


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.



来源:https://stackoverflow.com/questions/55077574/running-kubectl-commands-helm-post-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!