Routes with both Kubernetes Ingress and File provider

Hi,

I have several Kubernetes "IngressRoute" which already works great. Then I am trying to add more Routes but using "File Provider" instead ( dynamic configuration ). However, looks like the "Routes" I have defined at the "File Provider" one looks like not working. When I am looking at Traefik Dashboard, it is even not showing at all. I can only see the "Service" which I have defined at "File provider" too.

Based on the situation above, I have an assumption that, when I have one or more "IngressRoute" defined, then routes defined at "File Provider" will be ignored.

Following is my Questions:

  • Is my assumption right?
  • If it wrong, what is the possibility of mistakes I have made?
  • is "Routes" defined at "File Provider" should be visible at Traefik dashboard?

Following is my "Dynamic configuration" writting as YAML which loaded as "File provider"

http:
  routers:
    Router0:
      entryPoints:
        - websecure
      service: android-grpc
      rule: Host(`grpc-android.kitaon.xyz`)
  #I can see following "services" named "android-grpc@file" at dashboard, but not the Router definition above
  services:
    android-grpc:
      loadBalancer:
        servers:
          - url: https://android-service.mai.svc.cluster.local:5000

I hope someone here can help me solve or understanding Traefik Router problem. Thanks in advance.

Regards,
Bayu.

Hello,

The dynamic configuration can be:

  • labels (docker provider, rancher provider, ...)
  • files (file provider)
  • CRD (ingressRoute)
  • ...

https://docs.traefik.io/v2.1/getting-started/configuration-overview/#the-dynamic-configuration

If you are using files, the dynamic configuration and the static configuration must be defined in separated files.

Also the file provider need to be enable: https://docs.traefik.io/v2.1/providers/file/

Hi Idez,

Thanks for your prompt of reply. Will dig in to this further.

Regards,
Bayu.