I am using traefik 2.1.6 as kuberentes ingress controller, now I want to add a new TCP entryPoint like this:
"containers": [
{
"name": "traefik-ingress-lb",
"image": "traefik:2.1.6",
"args": [
"--configfile=/config/traefik.yaml",
"--logLevel=INFO",
"--metrics=true",
"--metrics.prometheus=true",
"--entryPoints.metrics.address=:8080",
"--metrics.prometheus.entryPoint=metrics",
"--metrics.prometheus.addServicesLabels=true",
"--metrics.prometheus.addEntryPointsLabels=true",
"--metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000",
"--entryPoints.web.address=:80",
"--entryPoints.websecure.address=:443",
"--entryPoints.xxljobmysql.address=:3308",
"--certificatesResolvers.ali.acme.email=jiangtingqiang@gmail.com",
"--certificatesResolvers.ali.acme.storage=/config/acme.json",
"--certificatesResolvers.ali.acme.httpChallenge.entryPoint=web",
"--certificatesResolvers.ali.acme.httpChallenge=true",
"--certificatesresolvers.ali.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
],
"ports": [
{
"name": "web",
"hostPort": 80,
"containerPort": 80,
"protocol": "TCP"
},
{
"name": "websecure",
"hostPort": 443,
"containerPort": 443,
"protocol": "TCP"
},
{
"name": "xxljobmysql",
"hostPort": 3308,
"containerPort": 3308,
"protocol": "TCP"
},
{
"name": "metrics",
"containerPort": 8080,
"protocol": "TCP"
}
],
the xxljobmysql
entryPoint is the new TCP entryPoint I wanted to add. But when I check on the Dashboard, It tell me:
entryPoint "xxljobmysql" doesn't exist
no valid entryPoint for this router
am I missing something and what should I do to fix it add make it work as expect?
The traefik loading entrypoint config from configmap( - '--configFile=/config/traefik.yaml'
), so just change the configmap like this:
serversTransport:
insecureSkipVerify: true
api:
insecure: true
dashboard: true
debug: true
metrics:
prometheus: ""
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
hadesmysql:
address: ":3311"
providers:
kubernetesCRD: ""
log:
filePath: ""
level: error
format: json
accessLog:
filePath: ""
format: json
bufferingSize: 0
filters:
retryAttempts: true
minDuration: 20
fields:
defaultMode: keep
names:
ClientUsername: drop
headers:
defaultMode: keep
names:
User-Agent: redact
Authorization: drop
Content-Type: keep
add the entrypoint in the file. do not modify in traefik yaml config:
# this would not work
- '--entryPoints.hadesmysql.address=:3311'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.