0

I have this terraform-kubernetes script terraform1

so prometheus scraping list of pods, and hitting /metrics based on custom resource Prometheus and PodMonitor rules

it's working fine locally using minikube,

but in GKE, it doesn't work,

podmonitor works normally:

service discovery works

but scraping failed (this part is green when on local minikube):

scraping targets

normally when I open the website on using port forwarding (32009 to random localhost port) it works normally 200, no error:

metrics exists using port-forwrding

does GKE disallow pod to pod communication? seems not since the error is 403 instead of something else, or I need to do something so Prometheus pod that lives on 10.63.1.4 can scrape other pods in the target list (10.63.1.252, 10.63.1.5, 10.63.3.5, 10.63.4.210, 10.63.1.133, etc)

Kokizzu
  • 123
  • 6

1 Answers1

0

Apparently it's software issue, the software being deployed have blocking on specific headers, it only allows specific Host: header, that's why it's 403 instead of timeout or something else.

Kokizzu
  • 123
  • 6