Grafana Agent collecting from headless service in kubernetes

Hi,

I have a headless service in kubernetes which resolves (through DNS) to 3 replicas (pods), and I want to scrape metrics from all those hosts. Is this possible in Grafana Agent config?

If I defined “targets” as the service DNS, it will only scrape from the first resolved ip I guess.

Any help appreciated,

/Kristian