Routing Configuration Reference

Configure Routing in TraefikEE

TraefikEE uses the same routing configuration system than Traefik. Therefore, the configuration is exactly the same in TraefikEE than it would be in Traefik. To get an overview of the routing configuration capabilities, please refer to the Traefik documentation.

The only difference is that TraefikEE does not require any restart to update its configuration. Better, the configuration can be redeployed as many times as you want!

Deploying configuration

Deploying a configuration on a production cluster can make the data plane miss a few requests.

To configure TraefikEE, use the traefikeectl or traefikee deploy command , using either command-line flags ("CLI") or providing a TOML file with the --configfile option.

You can find more information about the Traefik command line arguments on the following pages:

Examples

Dynamic Routing Configuration from Kubernetes

Configure TraefikEE with the following:

  • Use Kubernetes as a provider for getting dynamic routing configuration
  • Enable a default entrypoint named http to listen for incoming HTTP requests on the port 80
traefikeectl deploy --kubernetes
## routing.toml
## Deploy with "traefikeectl deploy --configfile=routing.toml"

[kubernetes]

Specific Configuration for Kubernetes

Configure TraefikEE with the following:

traefikeectl deploy --kubernetes \
    --kubernetes.namespaces=traefikee,production
## routing.toml
## Deploy with "traefikeectl deploy --configfile=routing.toml"

[kubernetes]
namespaces = ["traefikee", "production"]

Listen on a Custom Entrypoint

Configure TraefikEE with the following:

traefikeectl deploy --kubernetes \
    --entryPoints='Name:internal Address::8888' \
    --defaultentrypoints=internal
## routing.toml
## Deploy with "traefikeectl deploy --configfile=routing.toml"

defaultEntryPoints = ["internal"]

[entryPoints]
  [entryPoints.internal]
    address = ":8888"

[kubernetes]

Important

When using an orchestrator, TraefikEE's installation creates 2 "network services" for:

  • HTTP on port 80
  • Eventually HTTPS on port 443.

If you want a custom entrypoint a different port, then you must configure the network service by yourself. This "service" allows incoming requests to reach TraefikEE's data plane elements on the custom entrypoint's port.

In the case of Kubernetes, create a "Kubernetes Service" targeting all the nodes of TraefikEE's data plane.

Listen on the HTTPS Entrypoint with ACME / Let's Encrypt Dynamic Certificates

Configure TraefikEE with the following:

traefikeectl deploy --kubernetes \
    --entryPoints='Name:https Address::443 TLS' \
    --defaultentrypoints=https \
    --acme.entryPoint=https \
    [email protected] \
    --acme.tlsChallenge
## routing.toml
## Deploy with "traefikeectl deploy --configfile=routing.toml"

defaultEntryPoints = ["https"]

[entryPoints]
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[acme]
email = "[email protected]"
storage = "acme.json"
entryPoint = "https"
[acme.tlsChallenge]

[kubernetes]

Important

When using DNS challenge, you have to set the appropriate environment variables on the control nodes.

Enable DataDog Metrics

If you want to use DataDog as a metric provider, you have to define the environment variables on your data nodes to set the IP and port of the DataDog agent.

Name Description Default Required
DOGSTATSD_HOST_IP The IP of the agent - yes
DOGSTATSD_HOST_PORT The port of the agent 8125 no
traefikeectl deploy --kubernetes \
    --entryPoints='Name:https Address::443 TLS' \
    --defaultentrypoints=https \
    --metrics.datadog
## routing.toml
## Deploy with "traefikeectl deploy --configfile=routing.toml"

defaultEntryPoints = ["https"]

[entryPoints]
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[metrics.datadog]

[kubernetes]