Hi all,
I have a 5 node swarm (3 managers and 2 worker), managers use a vip address with keepalived that insist on the first master, if it goes down jump to the second etc... all the stuff about entrypoint are made by traefik.
I'm quite new to this kind of infrastructure and maybe my request is silly.
If a schedule a service (let's say grafana) on the first master everything work fine, if i schedule grafana on the second/third master i have a 504 gateway timeout error.
Could be a traefik bad configuration?
If i go directly to the ip of node i could reach grafana so it seems that is a traefik issue.
No firewall between nodes, atm i don't need tls/https/certs
If i inspect the container i see the assigned ip for traefik_public and is the same i see into traefik dashboard as load balanced ip/port.
Traefik log report only
I'm expecting that traefik will route traffic despite the master node is not the 1st node.
I cannot figure if is my configuration error or if treafink dosen't work in this way.
Thanks in advance
Tell Traefik which docker.network to use to forward requests to the service. Your service has multiple but Traefik probably just shares one with it. You can set that globally in provider.docker or per service with labels.
But everything stop working: 504 from grafana on monitoring.example.local (even if untouched) and 404 on monitoring.example.local:9090.
I know the issue is just on traefik conf but i don't know how to solve it
You are using Host(`monitoring.example.local`) and Host(`monitoring-example.local`), is that on purpose?
You want Grafana to use Traefik to connect to Prometheus? On external (Traefik) port 9000? Then you need to enable a Traefik entrypoint on port 9000 and let Prometheus use it.
Or you can let Grafana connect to Prometheus using the Docker network monitoring (without Traefik), the Docker DNS should resolve prometheus to the internal IP.
The host has to be intended the same, i made an error redacting the original website in compose.
I solved the issue using internal "monitoring" network, the desired behaviour should be monitoring.example.com - grafana monitoring.example.com:9090 - prometheus
I will add an entrypoint and start testing around, thank you