简体   繁体   中英

Is it possible to use Traefik in a Docker swarm and still use container-label-based routing?

As it is mentioned in the title, I am looking for a way to use Traefik in a Docker Swarm cluster. However, different subdomains should point to different containers. But these are all distributed "identically" through a stack on all nodes. I would then enable routing via manual added labels at the container level. However, as far as I have noticed, in swarm mode Traefik only supports routing by labels at service level? Can I do this in a swarm mode also on container level?

Default Traefik behaviour using inside docker swarm deployments is the normal RR mechanism Traeik offers to hit containers. You have to enable the RR to the VIP Service IPs that Swarm provides if you want Traefik to work with services instead of containers. This behaviour is configured using Traefik's lbswarm property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM