Hi all. I’m trying to get Kratos setup on Kubernet...
# ory-selfhosting
a
Hi all. I’m trying to get Kratos setup on Kubernetes behind the Ingress NGINX Controller. I’m also using the standalone self-service UI node. I’ve seen some posts here about redirect loops and I’m getting the same issue on registration and login flows. Has anyone here figured out the correct Kratos + NGINX configuration to get this working? Right now I have Kratos and UI running on the same domain to simplify cookies (app.example.com/kratos and app.example.com/ui)
n
I am so glad to see I am not alone! I am working on the issue by debugging both sides inside of Kubernetes, but it takes a LOT of setup to even try. I had to install DNS (using PowerDNS), a Kubernetes stack on my machine (currently using the Kubernetes built in to Docker Desktop after failing to get Minkube working), External DNS, and my application components. Soon, I hope to derive an answer after hooking up remote debugging from within the cluster. If you happen to find an answer before I do please share, but once I do figure this out, I will be writing an article on Medium describing all this.
l
@User is it working with both Kratos and UI under the same domain?
w
it will require managing your
/etc/hosts
but it is possible to use https://caddyserver.com as a reverse proxy, to expose your applications from a local cluster
a way of doing it without any dns is also possible. If you expose your app on the ingress as
<http://foo.com|foo.com>
, you can connect to it via:
Copy code
curl -ikv ${INGRESS_IP} -h "Host: <http://foo.com|foo.com>"
n
I did get this working fine using the Cookie method. However, when I try to use Oathkeeper for JWT's the Kubernetes install still doesn't work.