microservices-demo
microservices-demo copied to clipboard
Frontent not reachable behind Ingress
Describe the bug
I tried to deploy the Online Boutique in my Kubernetes Cluster, but somehow the frontend is not reachable from my Browser behind a Traefik Ingress. It shows a 404 Error.
To Reproduce
- Successfully create Traefik Ingress on Kubernetes Cluster
- Install Online Boutique via Helm
helm upgrade onlineboutique oci://us-docker.pkg.dev/online-boutique-ci/charts/onlineboutique --install --create-namespace -n demo
- Patch frontend-external service to get ClusterIP
kubectl patch svc frontend-external -n demo -p '{"spec": {"type": "ClusterIP"}}'
- Create Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
traefik.ingress.kubernetes.io/router.tls: "true"
cert-manager.io/cluster-issuer: acme
name: jupyter-ingress
spec:
rules:
- host: <HOST>
http:
paths:
- path: /demo
pathType: Prefix
backend:
service:
name: frontend-external # frontend also doesn't work
port:
number: 80
tls:
- hosts:
- <HOST>
secretName: traefik-tls-secret
- Add Ingress to Namespace
kubectl -n demo apply -f demo-ingress.yaml
For any other application this approach works. Do I miss some configuration?
Environment
- OS: Openstack
- Kubernetes distribution, version: Charmed Kubernetes v1.27.3 on Openstack
Hello @amrap030 , we will try to address your question. I am not familiar with the Trafeik ingress configurations and can only guess how it works. While we work to review your question, can you please confirm the following two points of interest:
- Is it required to specify the namespace where the backend's service is provisioned if the service is not provisioned in the
default
namespace? I see that you deploy online boutique manifests intodemo
namespace which will provision thefrontend-external
service in that namespace as well. - Is it required to specify different path than one the request is received at ingress? Since the path in the shown configuration is
/demo
and Online Boutique uses/
it is possible that additional configuration to redirect requests made to/demo
to be forwarded to/
is required.
@NimJay please let me know if you need additional information about this behavior from a reporter.
@amrap030, unfortunately, we (Online Boutique developers) don't actively support users journeys for Traefik Ingress.
- Your
Ingress
object looks good to me. It looks very similar to theIngress
object we use for onlineboutique.dev. But I cannot speak on the Traefik Ingress parts of your Ingress object (but you mentioned that same Ingress worked for other apps, so I assume the Traefik-related parts are good too). - Thanks for testing both
frontend
andfrontend-external
BTW.
1. Could you also please try without path: /demo
?
2. Are you able to obtain more logs (any logs on the Ingress object? what about the Service
s? any Traefik-related logs you can pull)?
Closing as inactive. Feel free to reopen if you have more details to provide.