Consul Catalog - Services not added to Traefik after exposedByDefault is set to false

3 Consul servers and agents installed. Each app will have its own consul sidecar.

Note that when exposedByDefault is true, the apps are detected and registered to traefik as consulCatalog provider and can be seen in the dashboard. Note that we have issues with routing and suspect that adding the annotations to the pods are not working.

Example annotations that are added to the pod:
traefik.enable: "true"
traefik.http.routers.demo.entrypoints: web
traefik.http.routers.demo.rule: Path('/v1') || PathPrefix('/v1') "8080" Path('/v1') || PathPrefix('/v1')

I am tried all of them and they do not work.
I have a simple test app that has a pod and a service. I access it after port forwarding, http://localhost:8080/v1/hello. Right now, it doesn't even detect the app.
It will be great to have some documentations on how and where to specify the annotations.


Are you using ACL Tokens with Consul?

I had the same behaviour because the ACL Token I was using for traefik despite having access to list the Consul catalog wasn't working as expected from within Traefik so it was actually not seeing the tags.

I needed to try with a different token with wider permissions for everything to work.


Thanks for sharing but i have solved this post's issue. I didn't have ACL enabled and it has nothing to do with ACL issue. It's a service tag issue.