Overview
The Konvoy Ops Portal is a convenient way to access your addon resources like Prometheus and Grafana, but you may need to access API resources using tools like Curl from outside the cluster.This article will highlight how that can be done with port forwarding.
It will assume that you are using the default Konvoy addons for Prometheus.
Instructions
Once your Konvoy cluster is deployed and your client machine is able to use kubectl commands, run the following:kubectl port-forward -n kubeaddons svc/prometheus-kubeaddons-prom-prometheus 8080:9090
This will open a tunnel, authenticated through kubectl, to the exposed port in the Prometheus pod.
While this is running, open a new terminal and you can make requests to "localhost:8080" which will be proxied to your Kubernetes cluster.
For instance, once the proxy tunnel is open, I can run:
curl localhost:8080/-/healthy
which will return a health check result from Prometheus.
See this page for more information about the Prometheus HTTP API:
https://prometheus.io/docs/prometheus/latest/management_api/
Once you are finished making your desired API requests, you can press Ctrl C in the terminal running the tunnel to close it.