<p>I am new to helm and I have tried to deploy a few tutorial charts. Had a couple of queries:</p>
<ol>
<li><p>I have a Kubernetes job which I need to deploy. Is it possible to deploy a job via helm?</p>
</li>
<li><p>Also, currently my kubernetes job is deployed from my custom docker image and it runs a bash script to complete the job. I wanted to pass a few parameters to this chart/job so that the bash commands takes the input parameters. That's the reason I decided to move to helm because it provided a more flexibility. Is that possible?</p>
</li>
</ol>

<p>You can use <code>Helm Hooks</code> to run jobs. Depending on how you set up your annotations you can run a different type of hook (pre-install, post-install, pre-delete, post-delete, pre-upgrade, post-upgrade, pre-rollback, post-rollback, crd-install). An example from the <a href="https://helm.sh/docs/topics/charts_hooks/" rel="nofollow noreferrer">doc</a> is as follows:</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
  name: &quot;{{.Release.Name}}&quot;
  labels:
    app.kubernetes.io/managed-by: {{.Release.Service | quote }}
    app.kubernetes.io/instance: {{.Release.Name | quote }}
    helm.sh/chart: &quot;{{.Chart.Name}}-{{.Chart.Version}}&quot;
  annotations:
    # This is what defines this resource as a hook. Without this line, the
    # job is considered part of the release.
    &quot;helm.sh/hook&quot;: post-install
    &quot;helm.sh/hook-weight&quot;: &quot;-5&quot;
    &quot;helm.sh/hook-delete-policy&quot;: hook-succeeded
spec:
  template:
    metadata:
      name: &quot;{{.Release.Name}}&quot;
      labels:
        app.kubernetes.io/managed-by: {{.Release.Service | quote }}
        app.kubernetes.io/instance: {{.Release.Name | quote }}
        helm.sh/chart: &quot;{{.Chart.Name}}-{{.Chart.Version}}&quot;
    spec:
      restartPolicy: Never
      containers:
      - name: post-install-job
        image: &quot;alpine:3.3&quot;
        command: [&quot;/bin/sleep&quot;,&quot;{{default &quot;10&quot; .Values.sleepyTime}}&quot;]
</code></pre>
<p>You can pass your parameters as <code>secrets</code> or <code>configMaps</code> to your job as you would to a pod.</p>
