0

I have created GKE Autopilot private and deployed Prometheus to it. I have Prometheus service in metrics namespace.

The problem is that I can access this service with kubectl port-forwarding command, but I can't access it with following setup:

  1. execute kubectl proxy

  2. execute curl http://localhost:8001/api/v1/namespaces/metrics/services/prometheus:80/proxy

Getting response:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "error trying to reach service: dial tcp 10.115.128.78:9090: i/o timeout",
  "reason": "ServiceUnavailable",
  "code": 503
}

But the thing is that:

  1. I can access other kubernetes API endpoints (curl http://localhost:8001/api/v1/namespaces/metrics/services for example)

  2. On GKE Autopilot public cluster I can access this prometheus endpoint

So it seems that private GKE API blocks part of requests, most probably it is expected, but is there any way to overcome this restriction (maybe some GKE configuration needs to be changed)?

New contributor
Roman Kuzmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

0

Your Answer

Roman Kuzmin is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy