title: kubernetes - unable to expose Prometheus using NodePort
body: <p>I have Prometheus installed on GCP, and i'm able to do a port-forward and access the Prometheus UI</p>
  <p>Prometheus Pods, Events on GCP :</p>
  <pre><code>Karans-MacBook-Pro:prometheus-yamls karanalang$ kc get pods -n monitoring -o wide
  NAME                                   READY   STATUS       RESTARTS   AGE     IP           NODE                                                NOMINATED NODE   READINESS GATES
  grafana-5ccfb68647-8fjrz               0/1     Terminated   0          28h     &lt;none&gt;       gke-strimzi-prometheus-default-pool-38ca804d-nfvm   &lt;none&gt;           &lt;none&gt;
  grafana-5ccfb68647-h7vbr               1/1     Running      0          5h24m   10.76.0.9    gke-strimzi-prometheus-default-pool-38ca804d-zzl9   &lt;none&gt;           &lt;none&gt;
  prometheus-operator-85d84bb848-hw6d5   1/1     Running      0          5h24m   10.76.0.4    gke-strimzi-prometheus-default-pool-38ca804d-zzl9   &lt;none&gt;           &lt;none&gt;
  prometheus-operator-85d84bb848-znjs6   0/1     Terminated   0          28h     &lt;none&gt;       gke-strimzi-prometheus-default-pool-38ca804d-nfvm   &lt;none&gt;           &lt;none&gt;
  prometheus-prometheus-0                2/2     Running      0          5h24m   10.76.0.10   gke-strimzi-prometheus-default-pool-38ca804d-zzl9   &lt;none&gt;           &lt;none&gt;
  prometheus-prometheus-1                2/2     Running      0          5h24m   10.76.0.7    gke-strimzi-prometheus-default-pool-38ca804d-zzl9   &lt;none&gt;           &lt;none&gt;
  prometheus-prometheus-2                2/2     Running      0          5h24m   10.76.0.11   gke-strimzi-prometheus-default-pool-38ca804d-zzl9   &lt;none&gt;           &lt;none&gt;
  
  
  Karans-MacBook-Pro:prometheus-yamls karanalang$ kc get endpoints -n monitoring
  NAME                  ENDPOINTS                                        AGE
  grafana               10.76.0.9:3000                                   28h
  grafana-lb            10.76.0.9:3000                                   54m
  prometheus-lb         10.76.0.10:9090,10.76.0.11:9090,10.76.0.7:9090   155m
  prometheus-nodeport   10.76.0.10:9090,10.76.0.11:9090,10.76.0.7:9090   149m
  prometheus-operated   10.76.0.10:9090,10.76.0.11:9090,10.76.0.7:9090   28h
  prometheus-operator   10.76.0.4:8080                                   29h
  
  </code></pre>
  <p>I've create a NodePort(port 30900), and also create a firewall allowing ingress to the port 30900</p>
  <pre><code>Karans-MacBook-Pro:prometheus-yamls karanalang$ kc get svc -n monitoring | grep prometheus-nodeport
  prometheus-nodeport   NodePort       10.80.7.195   &lt;none&gt;           9090:30900/TCP   146m
  </code></pre>
  <p>However, when i try to access using http://&lt;node_ip&gt;:30900,
  the url is not accessible.
  Also, telnet to the host/port is not working</p>
  <pre><code>Karans-MacBook-Pro:prometheus-yamls karanalang$ telnet 10.76.0.11 30900
  Trying 10.76.0.11...
  
  
  Karans-MacBook-Pro:prometheus-yamls karanalang$ ping 10.76.0.7
  PING 10.76.0.7 (10.76.0.7): 56 data bytes
  Request timeout for icmp_seq 0
  
  </code></pre>
  <p>Here is the yaml used to create the NodePort (in monitoring namespace)</p>
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: prometheus-nodeport
  spec:
    type: NodePort
    ports:
    - name: web
      nodePort: 30900
      port: 9090
      protocol: TCP
      targetPort: 9090
    selector:
      prometheus: prometheus
  </code></pre>
  <p>Any ideas on what the issue is ?
  How do i debug/resolve this ?</p>