<p>I am trying to deploy an nginx ingress controller which can be monitored using prometheus however I am running into an issue that it seems no metrics pod(s) is being created like most posts and docs I have found online show. </p>

<p>I'm using helm to deploy the ingress controller and using a CLI arguement to enable metrics.</p>

<pre><code>helm install ingress stable/nginx-ingress --set controller.metrics.enabled=true
</code></pre>

<p>Here is my ingress file</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    # add an annotation indicating the issuer to use.
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: "letsencrypt-dev"
    # needed to allow the front end to talk to the back end
    nginx.ingress.kubernetes.io/cors-allow-origin: "https://app.domain.com"
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, PATCH, OPTIONS"
    # needed for monitoring
    prometheus.io/scrape: "true"
    prometheus.io/port: "10254"
  name: dev-ingress
  namespace: development
spec:
  rules:
  - host: api.&lt;domain&gt;.com
    http:
      paths:
      - backend:
          serviceName: api
          servicePort: 8090
        path: /
  tls: # &lt; placing a host in the TLS config will indicate a certificate should be created
  - hosts:
    - api.&lt;domai&gt;.com
    secretName: dev-ingress-cert # &lt; cert-manager will store the created certificate in this secre

</code></pre>

<p>In case this makes a difference I am using the prometheus operator helm chart with the below command.</p>

<pre><code>helm install monitoring stable/prometheus-operator --namespace=monitoring
</code></pre>

<p>All namespaces exist already so that shouldn't be an issue, as for the development vs monitoring name spaces I saw in many places this was acceptable so I went with it to make things easier to figure out what is happening.</p>

<p>I would follow this <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/monitoring.md" rel="noreferrer">guide</a> to setup monitoring for Nginx ingress controller. I believe what you are missing is a <a href="https://github.com/kubernetes/ingress-nginx/blob/master/deploy/prometheus/prometheus.yaml" rel="noreferrer">prometheus.yaml</a> which defines scrape config for the Nginx ingress controller and <a href="https://github.com/kubernetes/ingress-nginx/blob/master/deploy/prometheus/role.yaml" rel="noreferrer">RBAC</a> for prometheus to be able to scrape the Nginx ingress controller metrics.</p>

<p><strong>Edit:</strong> Annotate nginx ingress controller pods</p>

<pre><code>kubectl annotate pods nginx-ingress-controller-pod prometheus.io/scrape=true -n ingress-nginx --overwrite

kubectl annotate pods nginx-ingress-controller-pod prometheus.io/port=10254  -n ingress-nginx --overwrite
</code></pre>
