运行kubectl命令Helm安装后 [英] Running kubectl commands Helm post install

查看:286
本文介绍了运行kubectl命令Helm安装后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想运行一些kubectl命令来验证Helm图表安装后的集群.我找不到与此有关的任何文档.在Helm中,存在将便笺显示为NOTES.txt的一部分的概念,但是看起来好像您不能在该阶段运行任何命令.

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.

这当前是否与Helm无关?

Is this currently impossible to do with Helm ?

推荐答案

您可以在可用钩子列表包含您可能正在寻找的post-install挂钩.可以在以下位置找到一个示例官方文档.

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.

基本上,您提供了一个Kubernetes作业,添加了必要的头盔标签,然后还添加了这样的注释:

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

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

如果您正在寻找在客户端运行的内容,也许您可​​以 Helm插件.您可以通过过滤主题 helm-plugin 的GitHub存储库中找到更多信息.

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.

对于未来开发有一些想法以支持Lua用于脚本插件.但是仍将支持当前格式.

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

这篇关于运行kubectl命令Helm安装后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆