Support microservices environment
I have setup coder with dev containers in k8s. Application includes 10 microservices, nginx, redis, database. Coder workspace run with all those services within one pod in k8s. I want to have coder environmnet more closer to real prod one to have seperate pod per service. I'm thinking about docker-in-docker solution with docker-compose run within one coder workspace or multiple workspaces interconnected via k8s service resources.
Could you recommend what solution could be implemented with coder for microservice like environment?
3 Replies
<#1327016657893199914>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
I personally have the supporting services, database, cache, mail server, etc. as standing services for development. In other words, the workspace containers are created in their own namespace, and are given "slices" of the resources. So, for instance, if I need a database to run a workspace, I have a new database (not a whole server, just a database), created and the workspace fires up.
Currently, this is a manual process of creating the database or other resource "slices". I intend to create a service application to allocate databases and other service slices automatically. I just haven't gotten to that part of my project yet. 😛
I've looked at attempting what you are expecting to do, and it is a nightmare. It would also slow down workspace container creation to minutes, instead of seconds (with the automation I spoke of in place). In fact, I believe a resource allocation app (service) for k8s to create these "slices" of service resources is a market gap. I have yet to find any application specific to this kind of work inside k8s. My intention is to make sure it isn't bespoke for my purposes, but it can employ plugins for any "service slicing". 🙂 I hope that made sense.
I would like to add that you could use a Kubernetes runtime inside your Coder workspace to run your microservices, interconning workspaces is still a tough thing at the moment