Deployment settings
spec:
containers:
- image: traefik:v2.2.5
name: traefik-proxy
resources:
limits:
cpu: 0.1
memory: 128Mi
command:
- "sh"
- "-c"
- "traefik"
Traefik settings
Example of toml which is using for running traefik as a reverse proxy:
apiVersion: v1
kind: ConfigMap
metadata:
name: traefik-proxy-config
data:
traefik.toml: |
defaultEntryPoints = ["http","https"]
logLevel = "INFO"
[file]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[frontends]
[frontends.some_front_end]
entrypoints = ["http"]
backend = "some_back_end"
[backends]
[backends.some_backend]
[backends.some_backend.servers.some_service]
passHostHeader = true
weight = 1
url = "http://some-service:80"
[accessLog]
format = "json"
filePath = "/mnt/log/access.log"
Explanations of settings
[file]
Is required when setting forntend/backend in filepassHostHeader = true
If not set, the Host header will be cut off, so depending on the configuration it will be addictedsome_front_end
,some_back_end
,some_service
can be replaced with any name- If you do not describe the load-balancing method, the default load-balancing
wrr
. Therefore,weight=N
setting of mandatorywrr
this isWeighted Round-robin