Auto Discovery (Providers)
The providers are infrastructure components, whether orchestrators, container engines, cloud providers, or key-value stores. Traefik Hub API Gateway queries the provider APIs in order to find relevant information about routing, and when a change is detected, it dynamically updates the routes.
Orchestrators
While each provider is different, you can think of each as belonging to one of four categories:
- Label-based: each deployed container has a set of labels attached to it
- Key-Value-based: each deployed container updates a key-value store with relevant information
- Annotation-based: a separate object, with annotations, defines the characteristics of the container
- File-based: uses files to define configuration
Supported Providers
Below is the list of the currently supported providers in Traefik.
Provider | Type | Configuration Type | Provider Name | Note |
---|---|---|---|---|
Docker | Orchestrator | Label | docker | Only documented in Traefik documentation yet |
Docker Swarm | Orchestrator | Label | swarm | Only documented in Traefik documentation yet |
Kubernetes IngressRoute | Orchestrator | Traefik Custom Resources | kubernetescrd | |
Kubernetes Ingress | Orchestrator | Ingress | kubernetes | |
Kubernetes Gateway API | Orchestrator | Gateway API Resources | kubernetesgateway | |
Consul Catalog | Orchestrator | Label | consulcatalog | Only documented in Traefik documentation yet) |
Nomad | Orchestrator | Label | nomad | Only documented in Traefik documentation yet |
ECS | Orchestrator | Label | ecs | Only documented in Traefik documentation yet |
File | Manual | YAML/TOML format | file | Only documented in Traefik documentation yet |
Consul | KV | KV | consul | Only documented in Traefik documentation yet |
ETCD | KV | KV | etcd | Only documented in Traefik documentation yet |
ZooKeeper | KV | KV | zookeeper | Only documented in Traefik documentation yet |
Redis | KV | KV | redis | Only documented in Traefik documentation yet The Redis provider configuration is not used by the middlewares which need Redis as a Store (OIDC, Distributed Rate-Limit, etc) |
HTTP | Manual | JSON format | http | Only documented in Traefik documentation yet |
Provider Namespace
When you declare certain objects in the Traefik dynamic configuration, such as middleware, services, TLS options or server transports, they reside in their provider's namespace. For example, if you declare a middleware using a Docker label, it resides in the Docker provider namespace.
If you use multiple providers and wish to reference such an object declared in another provider
(e.g. referencing a cross-provider object like middleware), then the object name should be suffixed by the @
separator, and the provider name.
For the list of the providers names, see the supported providers table below.
<resource-name>@<provider-name>
As Kubernetes also has its own notion of namespace, one should not confuse the provider namespace with the Kubernetes Namespace of a resource when in the context of cross-provider usage.
In this case, since the definition of a Traefik dynamic configuration object is not in Kubernetes, specifying a Kubernetes Namespace when referring to the resource does not make any sense.
On the other hand, if you were to declare a middleware as a Custom Resource in Kubernetes and use the non-CRD Ingress objects,
you would have to add the Kubernetes Namespace of the middleware to the annotation like this <middleware-namespace>-<middleware-name>@kubernetescrd
.
📄️ Consul Catalog Enterprise
Configure Consul Catalog Enterprise as a provider for configuration discovery in Traefik Hub API Gateway
📄️ Kubernetes Gateway API
Configure the Kubernetes Ingress provider that allows managing the Gateway API.
📄️ Kubernetes CRD
Configure the Kubernetes CRD provider that allows managing Traefik Hub API Gateway custom resources.
📄️ Kubernetes Ingress
Configure the Kubernetes Ingress provider that allows managing the Ingress objects.