K8S MySQL Traefik IP Whitelist
2 min readMar 2, 2023
From my old post, I created Traefik and MySQL in K8S. This post will use Traefik to route MySQL to outside world and allow IP Whitelist only.
Traefik
MySQL
My Repo
From My Repo, You can see file 05-traefik.yml. Add entrypoint and port in traefik deployment.
Add port in traefik-service. And add externalTrafficPolicy: Local (for display external IP in traefik)
Add IngressRouteTCP with middleware IP Whitelist.
Add MiddlewareTCP IP Whitelist.
Change IP to your IP and try connect MySQL from outside. Hope this help.