I have two aks cluster setup: A. My application B. Monitoring
I have configured my application to expose JMX stats via prometheus and can successfully fetch the pod-name/metrics as long as I am on the same cluster.
My requirement is that I want to set this pod as a target in my prometheus server which is running on cluster B.
I have tried setting up vnet peering between the two clusters which allows me to reach the cluster A pod from Cluster B via pod IP. example: pod-ip:9090(jmx-port)/metrics. However, since the pod ip is dynamic I was looking for a way to resolve the request via pod-name. Any information will be helpful.