My Java application deployed in 4 active servers(app1/app2/app3/app4). I use NGINX as load balancer to route traffic to my java application. NGINX is installed on 2 servers (lb1/lb2). Both nginx are active and serve requests at 50-50 ration
i want to secure my traffic to load balancers using Cloudflare tunnel.
so i created/configured Cloudflare tunnel locally on lb1 CNAME(cfargotunnel)record created automatically in Cloudflare UI and working perfect.
when i execute the same in lb2 its failing at below command
“cloudflared tunnel route dns prodshoptunnel2 shop.techxenon”
getting error “Failed to add route: code: 1003, reason: An A, AAAA, or CNAME record with that host already exists”
i understood that CNAME is already created by tunnel on lb1(prodshoptunnel1).
How to resolve this?
The point is i need to bring two NGINX load balancers into Cloudflare tunnel scope to serve traffic.
flow is Browser–>Cloudflare–Nginx(loadbalancer1/2)–java server