Ok,
I have solved this issue by myself via specifying the subpath in prometheus and grafana directly. Now it's working as expected with this configuration:
api:
dashboard: True
entryPoints:
web:
address: ":80"
http:
routers:
prometheus-router:
rule: "PathPrefix(`/prometheus`)"
service: prometheus
entryPoints:
- web
grafana-router:
rule: "PathPrefix(`/grafana`)"
service: grafana
entryPoints:
- web
dashboard:
rule: "PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
service: dashboard@internal
entryPoints:
- web
services:
prometheus:
loadBalancer:
servers:
- url: "http://127.0.0.1:9090/"
grafana:
loadBalancer:
servers:
- url: "http://127.0.0.1:3000/"
The only thing that still doesn't work is the access to the traefik dashboard or API... if anybody has an idea, I would be happy.