Start two jars into same kubernetes container sequentially

1/6/2022

I want to deploy Java microservice in kubernetes container. I am bundling APM agent to this microservice by passing JAVA_TOOL_OPTION as environment variable and mention jar file path for APM agent. The problem is when I include APM agent with microservice, it takes 100 seconds to start. Is there any way I can decouple microservice and APM agent, and run in same kubernetes container. I want to reduce the start time for microservice as APM agent is causing startup delay. Can you advise how can I start the microservice , wait for 2 min, and then start APM agent. Is there any downside of this approach?

-- Bhushan Patil
amazon-web-services
docker
kubernetes

0 Answers