nginx-prometheus-exporter deployment failing nginx-prometheus-exporter deployment failing kubernetes kubernetes

nginx-prometheus-exporter deployment failing


nginx container is listening on port 80, and you configure the sidecar to access to 8080 port. Moreover, you deploy this in "production" namespace, but using "test" to access to nginx.

Try with -nginx.scrape-uri=http://nginx.production.svc.cluster.local:80/stub_status.

BTW you must know that containers within a Pod share an IP address and port space, and can find each other via localhost.

So you can use -nginx.scrape-uri=http://localhost/stub_status.