Reputation: 949
I need your suggestions to architect a solution. I have a solution(.NET Core) with 5 API projects.
Solution
Project 1
Project 2
Project 3
Project 4
Project 5
which runs on different ports, Like
http://localhost:10500/api/values ,
http://localhost:10501/api/values .. so on
http://localhost:10504/api/values
(Only the post number changes )
Requirement is to dockerize this solution and run in Kubernetes cluster via Kube Ingress, what is better way of Implementing?
1) Create one Image deploy the solution and EXpose multiple ports?
2) Use Docker COmpose and build proj1 Export port, build project 2 expose port 2 etc?
Any ideas much appreciated, please?
Upvotes: 0
Views: 868
Reputation: 16485
I think the right solution depends on the requirements. Choosing option 1 would have those consequences:
In short: Since you can use a dedicated Image for each service, if you use docker-compose
, you have a much finer granularity for updates, scaling and monitoring.
Upvotes: 1