clarify automatic service creation/assignment with labels
This commit is contained in:
parent
c8fa059064
commit
c6e783e7c3
6 changed files with 156 additions and 5 deletions
16
docs/content/routing/providers/service-by-label.md
Normal file
16
docs/content/routing/providers/service-by-label.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
In general when configuring a Traefik provider,
|
||||
a service assigned to one (or several) router(s) must be defined as well for the routing to be functional.
|
||||
|
||||
There are, however, exceptions when using label-based configurations:
|
||||
|
||||
1. If a label defines a router (e.g. through a router Rule)
|
||||
and a label defines a service (e.g. implicitly through a loadbalancer server port value),
|
||||
but the router does not specify any service,
|
||||
then that service is automatically assigned to the router.
|
||||
1. If a label defines a router (e.g. through a router Rule)
|
||||
but no service is defined, then a service is automatically created
|
||||
and assigned to the router.
|
||||
|
||||
!!! info ""
|
||||
As one would expect, in either of these cases, if in addition a service is specified for the router,
|
||||
then that service is the one assigned, regardless of whether it actually is defined or whatever else other services are defined.
|
Loading…
Add table
Add a link
Reference in a new issue