I used kubectl proxy to access the ICP prometheus service. Eg http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/monitoring-prometheus:9090/ However this returns a 401 unauthorized.
What authorization header/certs is needed to allow one to access prometheus in ICP?
My goal is to use Prometheus UI/api directly (to try some queries). I see that in the ICP monitoring for Grafana, the Prometheus datasource has TLS and ca cert configured so I would like to know how to acquire those details.
I use a curl command like this, which you should be able to convert to whatever you use to make the request and interpret the response:
ACCESS_TOKENis the Access token returned bycloudctl tokensafter logging in withcloudctl login.MASTER_IPandQUERYshould be obvious, but you will need to escape special characters in yourQUERYso that it can be interpreted by Prometheus correctly.You can find more details on this at these links (some of the details aren't quite accurate right now, but they will be updated soon):