I have set up an Identity Server and BFF (Backend for Frontend) application within the same Kubernetes pod, utilizing multiple containers.
The problem I am facing is that when I access the "bff/login" endpoint, the BFF application should redirect me to the Identity Server login page via the YARP reverse proxy. This redirection works perfectly on my local development environment, but after deploying the application to Kubernetes, it no longer functions as expected. The BFF application does not navigate to the Identity Server, nor does it redirect to the specified URL provided in the authority.
In Kubernetes there is a reverse proxy called trefik as in kubernetes you need a reverse proxy to work.
Could anyone help me troubleshoot this issue so BFF application can successfully redirect to the Identity Server login page?
I have tried deploying each application in seprate pod and in same pod as different containers
Here is my Ingress Route
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress
namespace: myapp-dev
annotations:
kubernetes.io/ingress.class: 'traefik'
cert-manager.io/cluster-issuer: 'letsencrypt-production'
spec:
tls:
- hosts:
- dev.myapp.com
secretName: dev.myapp.com-tls-secret
rules:
- host: dev.myapp.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myapp
port:
number: 8