Traefik in kubernetes with ingresRoute

I have one question here. Traefik is install in kube-system namespace. Can I create a route for the "default" namespace? The ingressRoute allows gives me a 404.

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: mynginx
  namespace: default
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`testweb.company.com`)
      kind: Rule
      services:
        - name: mynginx
          namespace: default
          port: 80

Could you please double-check that Nginx exposes the endpoint on port 80?

You can easily validate it by:

kubectl get endpoints -n default

1 Like

Thanks for the clue. the nginx server was missing the selector. This is now fixed. Thank you.

1 Like