In Traefik 2.x, we were able to use the unqualified network name in Traefik labels. With Traefik 3.x, I’m finding that doesn’t work and the stack name needs to be included in the label for Traefik to select the right IP.
Does anyone know a better way to do this? I don’t want to make my compose files depend on a particular stack name.
Traefik 2.x version:
services:
echo:
networks:
- lb
- private
deploy:
labels:
- "traefik.docker.network=lb"
Traefik 3.x equivalent:
services:
echo:
networks:
- lb
- private
deploy:
labels:
- "traefik.swarm.network=mystack_lb"