<p>I am following the <a href="https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md#include-servicemonitors" rel="nofollow noreferrer">documentation</a> to create services operator. I am not sure why I cannot access the Prometheus services.</p>
<p>My apps.yml:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
  name: sms-config-service
  labels:
    app: sms-config-service
spec:
  type: NodePort
  selector:
    app: sms-config-service
  ports:
  - port: 8080
    targetPort: 8080
    name: http
</code></pre>
<p>My ServiceMonitor yml:</p>
<pre><code>apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    app: servicemonitor-sms-services
  name: servicemonitor-sms-config-services
  namespace: metrics
spec:
  selector:
    matchLabels:
      app: sms-config-service
  endpoints:
    - port: http
</code></pre>
<p>Prometheus yml:</p>
<pre><code>apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prometheus
spec:
  serviceAccountName: prometheus
  serviceMonitorSelector:
    matchLabels:
      app: servicemonitor-sms-services
  resources:
    requests:
      memory: 800Mi
  enableAdminAPI: true
</code></pre>
<p>Prometheus config yml:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: prometheus
spec:
  type: NodePort
  ports:
    - name: web
      nodePort: 30900
      port: 9090
      protocol: TCP
      targetPort: web
  selector:
    prometheus: prometheus
</code></pre>
<p>When I access the url below, browser shows &quot;unable to connect&quot;. I am not sure where I did wrong? Should I set up a deployment for the Prometheus?</p>
<hr />
<pre><code>$ minikube service prometheus --url
http://192.168.64.3:30900
</code></pre>
<p>Update:
I have the prometheus pod running on NodePort 32676.
<a href="https://i.stack.imgur.com/pHGlx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pHGlx.png" alt="enter image description here" /></a>
Should I change the Prometheus config yml to fix the issue?</p>

kevin
<p>I find the issue is I don't have <code>serviceAccountName</code> created.</p>
