I have spring boot application and deployed in kubernetes with 4 replica pods configurations. Now I have spring profiles: api
and scheduler
. When api
spring profile is active then only pods will run those apis and when scheduler
profile is active the pods will run the scheduler code.
Now I want 2 of my pods to run with api
and other 2 pods with scheduler
spring profile. How can I achieve that in kubernetes?
How can I deploy a kubernetes replica pods with different spring profiles
689 views Asked by Rohit Singh At
1
One of the option is to define two pod yaml and override the docker file CMD and entrypoint. Yaml file 'command and args' will override whatever mention in docker's Entrypoint.
For api container
Similarly you can define for scheduler container.