Traefik ConsulCatalog defaultRule with Labels

Hey guys,

I’m trying to use a specific Label at my service definition as part of the URL.

apiVersion: v1
kind: Service
  name: example0
    test: myapp0
    app: example
    - port: 80

With the defaultRule at the traefik command-CLI

- --providers.consulcatalog.defaultRule=Host("{{ regexReplaceAll `([^-].*)\-.*` .Name `$1` }}.{{ index .Labels `test`}}.k8s")

I only get example0…; the value of my customLabel ‘test’ is missing.
I assume the label is missing in ConsulCatalog too.
How to check this? How to bring the Label from K8s to Consul Catalog?

Hey @Raskosk

You can set either tags or meta via annotations on your k8s service and that will show up in consul catalog.