Skip to content

Instantly share code, notes, and snippets.

@jdayllon
Last active March 13, 2021 13:15
Show Gist options
  • Save jdayllon/73d3dab46b4a272ae84a8518c0ba9b10 to your computer and use it in GitHub Desktop.
Save jdayllon/73d3dab46b4a272ae84a8518c0ba9b10 to your computer and use it in GitHub Desktop.
Simplest wildcard with exception kubernetes routing from external Traefik
## DYNAMIC CONFIGURATION
http:
routers:
route-to-example-api:
rule: "Host(`api.example.com`)"
service: route-to-example-api
priority: 2
entryPoints:
- websecure
middlewares:
- https-redirect
tls:
certResolver: lets-encr
route-to-example:
rule: "HostRegexp(`example.com`,`{subhost:[a-z0-9]+}.example.com`)"
service: route-to-kubedev
entryPoints:
- websecure
- web
priority: 1
tls:
certResolver: lets-encr
domains:
- main: "example.com"
sans:
- "*.example.com"
services:
route-to-example:
loadBalancer:
servers:
- url: http://internal-network-address:8000
route-to-example-api:
loadBalancer:
servers:
- url: https://internal-network-address-to-k8s:16443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment