Hello,
I'm trying to use Traefik as Reverse Proxy in my Kubernetes cluster, but TCP Router are not working properly.
For HTTP Router, i'm using Kubernetes ingress routes and it' working perfectly, but now I want to use also TCP Routers, that I configured in Traefik config file, but in Traefik dashboard, only HTTP router appears.
Summing up, I want to apply http routers for access to 80, 443 and 8080 ports, via Kubernetes ingress routes, and tcp routers, for ssh (port 22), via traefik config. Is it possible?
This is my traefik config.
#traefik.toml
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.websecure]
address = ":443"
[entryPoints.ssh]
address = ":22"
[tcp]
[tcp.routers]
[tcp.routers.ssh]
entryPoints = ["ssh"]
rule = "HostSNI(*)"
service = "ssh"
[tcp.services]
[tcp.services.ssh.loadBalancer]
[[tcp.services.ssh.loadBalancer.servers]]
address = "10.245.156.175:22"
[accessLog]
[api]
dashboard = true
insecure = true
[providers.kubernetesCRD]
#[certificatesResolvers.default.acme]
# email = "EMAIL"
# storage = "acme.json"
# [certificatesResolvers.default.acme.tlsChallenge]
And, I also leave here my IngressRoute:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: ingressroutetls
namespace: default
spec:
entryPoints:
- web
- websecure
routes:
- match: Host(`URL`) && PathPrefix(`/`)
kind: Rule
services:
- name: INTERNAL-SVC
port: 80
Here is my traefik dashboard:
Traefik logs:
time="2019-10-24T13:25:36Z" level=info msg="Configuration loaded from file: /etc/traefik/traefik.toml"
10.244.0.1 - - [24/Oct/2019:13:27:20 +0000] "GET / HTTP/1.1" 404 19 "-" "-" 1 - - 0ms
10.244.0.1 - - [24/Oct/2019:13:55:05 +0000] "POST /editBlackAndWhiteList HTTP/1.1" - - "-" "-" 2 - - 0ms