Hey guys, our team has deployed Kratos to a kubern...
# talk-kratos
b
Hey guys, our team has deployed Kratos to a kubernetes cluster and are curious about how others consume the service for local development. We've elected to deploy two instances of kratos which write to the same database, locally deployed to the cluster, but having different redirect and cors configurations. Are there any recommended approaches to this?
@magnificent-energy-493 do you have any thoughts or perhaps there's something I can search for in the docs? The only section I've found on local development of apps that use self hosted kratos hasn't been tremendously informative (maybe one or two sentences).
m
Hey Ed, if I get this right, the question is basically if its OK to run 2 instances of Ory Kratos that write to the same DB ? I think there was a discussion on this on GitHub but AFAIK no docs 😕
b
Hi Vincent, yes it’s what we are doing at the moment, however, I’m more looking for guidance on what is typically the approach for local development. Our frontend uses the ory typescript sdk, and we are curious about how we can configure kratos to allow requests from localhost while developing this app. In an ideal world, we would be able to use a single instance of kratos running in our kubernetes cluster that protects our dev environment as well as allows frontend developers the ability to use it.
m
Hey Ed, It is unfortunately not an easy issue, especially with things like OIDC. In Ory Network we have solved this with Ory Tunnel/Proxy: https://www.ory.sh/docs/guides/cli/proxy-and-tunnel They are basically specialized versions of Ory Oathkeeper to proxy the requests from localhost to your Ory Network instance. I think the same approach could work for you as well. AFAICT the code is here: https://github.com/ory/cli I think many also just run a duplicate dev instance in parallel to the main one - tbh that is what I would recommend as well, it seems the most simple setup.
b
The dev instance of kratos will be running on https://auth.dev.example.com so if we do that, is it relatively simple to set up the ability for apps running on http://localhost to communicate with that?
m
Yes that should work. I havent set it up for self-hosted Ory yet, but in principle would be the same approach as with Ory Tunnel.
b
Alright I’ll try it. Would you anticipate csrf issues and maybe some issues with http <> https?