Embedding Jar in Spring Boot App

Cluster information:

Kubernetes version: 1.17
Cloud being used: Private Cloud
Installation method: AWS EKS
Host OS: Linux


Hi All,

I have App 01 ( spring boot based rest end point ) and app 02 ( jar file ).

As App 02 changes triggered by business persons and immediately we will build as jar using jenkins.

App 02 is embedded as jar in current situation. Now, App 01 never changes but app 02 change on demand.

How can we achieve the embed the app 02 every now an then in app 01 ?

I figured out the approaches

  • We can make App 02 jar as maven dependency in App 01. problem is “jenkins make releases then i have to update the app 01 manually and redeploy”

  • I can make app 02 as init side car in app 01 and make use of the rolling build approach …but problem is “i have to update the sidecar version every-time manually”

above stated one’s has issues. any other way we can achieve using kubernetes built in features ?

Obviously my comments are based on limited understanding of your apps, so I’m assuming App 01 is a web service and App 02 contains some logic required by the webservice.

I think the best solution here is to keep it simple and recompile App 01 with the App 02 dependency embedded, build a new container image, and deploy that to K8s as needed. That way everything is packaged up together and the deployment is simple.

If App 02 is also a webservice that can run independently then you could potentially have App 02 in a separate pod behind a service and make calls from App 01. Then you could have regular updates to App 02 without impacting App 01.

Hard to give any other advice without knowing more about the apps.

Kind regards,