Routing Configuration Reference¶
Configure Routing in TraefikEE¶
To configure the routing in TraefikEE (after installation),
deploy a normal Traefik Configuration
using the traefikeectl deploy
command line,
using either command-line flags ("CLI") or providing a TOML file
with the --configfile
option.
You can find more information about the normal Traefik command line arguments on the following pages:
traefik
command line (CLI)traefik
CLI arguments- Configuring Traefik's Entrypoint with CLI arguments
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:
- Identical settings to the Dynamic Routing Configuration from Kubernetes
- Pass a specific setting for the Kubernetes provider, to watch only the Kubernetes namespaces
traefikee
andproduction
for applications to route traffic to. More information on the Traefik's Kubernetes Ingress Provider page
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:
- Identical settings to the Dynamic Routing Configuration from Kubernetes
- Enable a custom entrypoint named
internal
to listen for incoming HTTP requests on the port 8888 - Disable the entrypoint named
http
(port 80), because of the default entrypoint configuration override. - Set the entrypoint named
internal
as the default one for incoming requests
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 Let's Encrypt (ACME) Dynamic Certificates¶
Configure TraefikEE with the following:
- Identical settings to the Dynamic Routing Configuration from Kubernetes
- Enable the entrypoint named
https
to listen for incoming HTTP requests on the port 443 - Disable the entrypoint named
http
(port 80), because of the default entrypoint configuration override. - Use TLS for the entrypoint named
https
, with certificates generated by Let's Encrypt (ACME) - Configure Let's Encrypt for TLS-ALPN-01 verification
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]