I was try to deploy several containers in order to load balancing but always I have the save error level=error msg="Router defined multiple times with different configurations...
My container has this labels:
traefik.enable=true
traefik.http.routers.whoami.entrypoints =web
traefik.http.routers.whoami.rule= w.localhost
How can I use several container services in order to load balancing?
The problem is that different configurations were found on replicas. Can you show all your configuration, including your services ?
Yes!! Every think is made with portainer.
replica1
traefik.enable=true
traefik.http.routers.whoami.entrypoints =web
traefik.http.routers.whoami.rule= host('w.localhost')
replica2
traefik.enable=true
traefik.http.routers.whoami1.entrypoints =web
traefik.http.routers.whoami1.rule= host('w.localhost')
I try these configuration and no results. Then I try this:
replica1
traefik.enable=true
traefik.http.routers.whoami.entrypoints =web
traefik.http.routers.whoami.rule= host('w.localhost')
replica2
traefik.enable=true
traefik.http.routers.whoami.service=replica2
and the same no results :(...
My static:
api:
insecure: true
entryPoints:
web:
address: ":80"
providers:
docker:
exposedByDefault: false
Basically I want attach throught docker provider replicas instances in the same traefik HTTP Router...
So, do you have some example how to treat each one to do replicas in the same url?
1 Like
It's been a while on this topic, but I have the same question.
I want to be able to start up a new updated container and have it spin up before killing off the old one so that I can have a zero-downtime upgrade.