<p>Currently I am trying to deploy one sample micro service developed using Spring Boot using Jenkins and Kubernetes on my on premise server. For that I am already created my Kubernetes resource using Helm chart.</p>

<p>I tested the Helm chart deployment using login in remote machine and in my home directory I created. And using terminal command "helm install" I deployed into kubernetes cluster. And end point is successfully working.</p>

<p><strong>My Confusion</strong> </p>

<p>Now only tested from terminal. Now I am trying to add the helm install command in my Jenkins pipeline job. So where I need to keep this helm chart? Need to copy to /var/lib/jenkins directory (Jenkins home directory) ? Or I only need to give the full path in command ?</p>

<p>What is the best practice for saving Helm chart for Jenkins deployment? I am confused about to follow standard way of implementation. I am new to this CI/CD pipeline. </p>

<p>The Helm chart(s) should almost definitely be source controlled.</p>

<p>One reasonable approach is to keep a Helm chart in the same repository as your service.  Then when Jenkins builds your project, it will also have the chart available, and can directly run <code>helm install</code>.  (Possibly it can pass credentials it owns to <code>helm install --set</code> options to set values during deployment.)  This scales reasonably well, since it also means developers can make local changes to charts as part of their development work.</p>

<p>You can also <a href="https://helm.sh/docs/developing_charts/#the-chart-repository-guide" rel="nofollow noreferrer">set up a "repository" of charts</a>.  In your Jenkins setup one path is just to keep a second source control repository with charts, and check that out during deployment.  Some tools like Artifactory also support keeping Helm charts that can be directly deployed without an additional checkout.  The corresponding downside here is that if something like a command line or environment variable changes, you need coordinated changes in two places to make it work.</p>
