Helm Nginx Ingress with Keycloak with path based routing

4/22/2020

We're trying to install Keycloak along with Nginx using Helm charts. We're deploying on DigitalOcean. We would prefer path based routing instead of domain based routing. So

www.example.com should go to the static content www.example.com/auth should go to keycloak.

I've the above path based routing working with just using Docker but would like to get this setup working with K8S.

in K8S, we've the domain based routing working with the Nginx Ingress Controller but don't know how to get path based routing working. One of my colleagues I spoke with said the following: "They are 2 different containers. K8s doesn't work like that. You cannot do a mount based virtual hosting, which is why microservices were introduced." I was looking at this article, which gave me some hope: https://brokenco.de/2017/12/04/virtualhosts-across-namespaces-in-k8s.html

If someone can provide an example of how to do this step by step, that will be great as I'm still learning K8S.

-- getITdone
docker
keycloak
kubernetes-helm
nginx
nginx-ingress

0 Answers