I used traefik 2.2 version. The toml format is dynamically configured. I created dev, test, and uat multiple namespaces on the kubernetes platform to distinguish my environment. Under each namespace, there is a mysql service. I want to use traefik to proxy mysql.
When I proxy dev, there is no problem, I can connect to mysql
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: dev-traefik-tcp
namespace: kube-dev
spec:
entryPoints:
-mysql
routes:
-match: HostSNI (`middle.dev.test.com`)
services:
-name: mysql5-6
port: 3306
Then I added test.
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: test-traefik-tcp
namespace: kube-test
spec:
entryPoints:
-mysql
routes:
-match: HostSNI (`middle.test.test.com`)
services:
-name: mysql5-6
port: 3306
After the creation of dev and test, the connection to mysql is lost. In this scenario, how should I configure it?