<p><strong>My Application Structure</strong></p>
<p>I am developing a tenant based application in service oriented architecture with deployment using kubernetes and Jenkins. In my application , It contains 15-20 number of microservices developing using spring boot. The each microservice need to be deploy separately for different customers. If I have 5 customer, I need to deploy 15 microservice for these 5 customer.This is the description about my tenancy model.</p>
<p><strong>Deployment Planning</strong></p>
<p>For this application I am planning to use kubernetes and Jenkins for deployment and implementing CI/CD pipeline.</p>
<p><strong>My Findings</strong></p>
<p>The nature of my application is building the images for different customer from same code by using spring cloud config server active profile functionality. Means In my docker file , I am launching the particular image by defining which is the active profile. Like the following,</p>
<pre><code>java -jar -Dspring.profiles.active=&lt;Profile_Name&gt; dbdata-0.0.1-SNAPSHOT.jar
</code></pre>
<p>Here I am configuring profile in config server. So here I am using same code for creating multiple images which belongs to each customer.</p>
<p><strong>Confusion</strong></p>
<p>If I am following this style, how I can create and launch different images from same code repository using Jenkins?  Is possible to launch multiple images using Jenkins from same code repository?</p>
<p>In summary, how can I understand multiple image creating and deployment as per above application structure?</p>

Mr.DevEng
<p>As you have several microservices, it's better to use tools like <a href="http://helm.sh" rel="nofollow noreferrer">Helm</a> + <a href="https://github.com/kubernetes-helm/chartmuseum" rel="nofollow noreferrer">Chartmuseum</a> to simplify management of these services. In this case you will have individual release (and Kubernetes namespace) per tenant. You can use different docker images tags if different docker images per tenant is required.</p>

<p>As for Jenkins part, I don't see any problems (you can build any number of docker images from 1 repo):</p>

<ul>
<li>create job to produce &amp; upload docker image(s)</li>
<li>create job to produce &amp; upload Helm chart(s)</li>
<li>create job(s) to deploy/update releases in Kubernetes</li>
</ul>

<p>It's not required to build different docker images if they differ only in command line. This command line (or env variable) can be overridden in a Kubernetes resource description.</p>
