<p>I would like to run some <code>kubectl</code> 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 <code>NOTES.txt</code> but doesnt look like you can run any commands at that stage.</p>

<p>Is this currently impossible to do with Helm ?</p>

nixgadget
<p>You can define a <code>job</code> that is executed at a certain point in the <a href="https://helm.sh/docs/topics/charts_hooks/#hooks-and-the-release-lifecycle" rel="nofollow noreferrer">lifecycle</a> during <code>helm install</code>. The <a href="https://helm.sh/docs/topics/charts_hooks/#the-available-hooks" rel="nofollow noreferrer">list of available hooks</a> also contains a <code>post-install</code> hook you are probably looking for. An <a href="https://helm.sh/docs/topics/charts_hooks/#writing-a-hook" rel="nofollow noreferrer">example</a> can be found in the official documentation.</p>
<p>You basically provide a Kubernetes Job, add necessary helm labels and then also an annotation like this:</p>
<pre class="lang-yaml prettyprint-override"><code>  annotations:
    &quot;helm.sh/hook&quot;: post-install
</code></pre>
<p>In case you are looking for something running on the client side, maybe you can <a href="https://helm.sh/docs/topics/plugins/" rel="nofollow noreferrer">use or create a Helm plugin</a>. There is a list in the official documentation: <a href="https://helm.sh/docs/community/related/#helm-plugins" rel="nofollow noreferrer">Helm Plugins</a>. You can find some more by filtering GitHub repositories for the topic <a href="https://github.com/topics/helm-plugin" rel="nofollow noreferrer">helm-plugin</a>.</p>
<p>There are ideas for <a href="https://github.com/helm/community/blob/master/hips/archives/helm/helm-v3/005-plugins.md" rel="nofollow noreferrer">future development</a> to support <code>Lua</code> for scripting plugins. But the current format will still be supported.</p>
