I have below NodePort grafana and prometheus services running in cluster:
$kubectl get services -n monitoring
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
grafana NodePort 172.2.5.6 192.168.1.2 3000:32001/TCP 25h
prometheus-service NodePort 172.2.3.4 <none> 8080:30000/TCP 25h
I am unable to fetch metrics using below command and also unable to open grafana services http://172.2.5.6:32001 from browser.
curl http://172.2.3.4:30000/metrics.
I can only access when i do port forwarding, is it possible to access these services without port forwarding and by using NodePort IP.
Does this cluster have any firewall rules which is blocking access? How to check?
A NodePort service is always accessible via the node IP + node port service.
Like this:
http://node-ip:32001
andhttp://node-ip:30000