我正在尝试使用 Traefik v2 创建TCP入口点。我在traefik.toml中有关注
[global]
checkNewVersion = true
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.websecure]
address = ":443"
[entryPoints.tcp5050]
address = ":5050"
并遵循 IngressRouteTCP
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: mosquitto-external
namespace: dev
spec:
entryPoints:
- tcp5050
routes:
- match: HostsnI(`*`)
kind: Rule
services:
- name: mosquitto
port: 5050
tls:
上面的方法效果很好。但是不能将 entryPoints tcp5050 重用于其他任何主机。我试图像这样使 HostsnI 专用的 IngressRouteTCP
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: mosquitto-external
namespace: dev
spec:
entryPoints:
- tcp5050
routes:
- match: HostsnI(`mosquitto.dev.domain.com`)
kind: Rule
services:
- name: mosquitto
port: 5050
tls:
passthrough: true
但这根本不起作用。
我在这里缺少什么?