ramesh k
ramesh k

Reputation: 23

How to Add HostPort prometheus-rancher-monitoring-prometheus to query from external nodes

I have prometheus-rancher-monitoring-prometheus pod running in one of the nodes in the cluster inside the Namespace: cattle-monitoring-system. I can access the prometheus within the cluster through the containerPort 9090.

I would like to access this pod from an external node out of cluster. I am trying to add the hostPort 9090 in statefulset but it is not updating. How can I access it?

Upvotes: 0

Views: 273

Answers (1)

Alez
Alez

Reputation: 2649

If you want to use a HostPort you should define an Ingress that listens for the incoming connections on ports 80 and 443 for HTTP and HTTPS requests, respectively, and forwards the requests to the hostPort

paths:
  - backend:
      serviceName: service-name
      servicePort: 9090

Upvotes: 0

Related Questions