K6 operator failed to send metrics to prometheus

Hi, I was testing to send test metrics to Prometheus. Somehow the k6 pods failed to send metrics with error in the log. Any suggestion?

time="2024-04-29T21:47:21Z" level=error msg="Failed to send the time series data to the endpoint" error="HTTP POST request failed: Post \"http://MYAZUREVMIP:9090/api/v1/write\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)" output="Prometheus remote write"
time="2024-04-29T21:47:21Z" level=warning msg="Successful flushed time series to remote write endpoint but it took 5.002244802s while flush period is 5s. Some samples may be dropped." nts=82 output="Prometheus remote write"

I have both on the same Azure subnet.

Thanks in advance!

Hi @andresmarquez !

Welcome to the community forums! :wave:

Let me double-check if you can’t see any metric from k6 in Prometheus.

I could assume that the error

Client.Timeout exceeded while awaiting headers

means that host/port MYAZUREVMIP:9090 is unreachable from the pod where k6 runs.

Would you be able to try running k6 for a longer time, jumping into the pod, and checking if the MYAZUREVMIP:9090 is accessible (maybe curl or something) from there?