</code></pre></div><h3id=prometheus-dashboard>Prometheus Dashboard<aclass=headerlinkhref=#prometheus-dashboardtitle="Permanent link"> ¶</a></h3><p>Open Prometheus dashboard in a web browser:</p><divclass=highlight><pre><span></span><code><spanclass=go>kubectl get svc -n ingress-nginx</span>
<spanclass=go>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE</span>
</code></pre></div><p>Obtain the IP address of the nodes in the running cluster:</p><divclass=highlight><pre><span></span><code><spanclass=go>kubectl get nodes -o wide</span>
</code></pre></div><p>In some cases where the node only have internal IP addresses we need to execute:</p><divclass=highlight><pre><span></span><code><spanclass=go>kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpath={.items[*].status.addresses[?\(@.type==\"InternalIP\"\)].address}</span>
</code></pre></div><p>Open your browser and visit the following URL: <em>http://{node IP address}:{prometheus-svc-nodeport}</em> to load the Prometheus Dashboard.</p><p>According to the above example, this URL will be http://10.192.0.3:32630</p><p><imgalt=Dashboardsrc=../../images/prometheus-dashboard.png></p><h3id=grafana>Grafana<aclass=headerlinkhref=#grafanatitle="Permanent link"> ¶</a></h3><divclass=highlight><pre><span></span><code><spanclass=go>kubectl apply --kustomize github.com/kubernetes/ingress-nginx/deploy/grafana/</span>
</code></pre></div><divclass=highlight><pre><span></span><code><spanclass=go>kubectl get svc -n ingress-nginx</span>
<spanclass=go>NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE</span>
</code></pre></div><p>Open your browser and visit the following URL: <em>http://{node IP address}:{grafana-svc-nodeport}</em> to load the Grafana Dashboard. According to the above example, this URL will be http://10.192.0.3:31086</p><p>The username and password is <code>admin</code></p><p>After the login you can import the Grafana dashboard from <ahref=https://github.com/kubernetes/ingress-nginx/tree/master/deploy/grafana/dashboards>official dashboards</a></p><p><imgalt=Dashboardsrc=../../images/grafana.png></p><h2id=caveats>Caveats<aclass=headerlinkhref=#caveatstitle="Permanent link"> ¶</a></h2><h3id=wildcard-ingresses>Wildcard ingresses<aclass=headerlinkhref=#wildcard-ingressestitle="Permanent link"> ¶</a></h3><p>By default request metrics are labeled with the hostname. When you have a wildcard domain ingress, then there will be no metrics for that ingress (to prevent the metrics from exploding in cardinality). To get metrics in this case you need to run the ingress controller with <code>--metrics-per-host=false</code> (you will lose labeling by hostname, but still have labeling by ingress).</p></article></div></div></main><footerclass=md-footer><divclass=md-footer-nav><navclass="md-footer-nav__inner md-grid"aria-label=Footer><ahref=../miscellaneous/class="md-footer-nav__link md-footer-nav__link--prev"rel=prev><divclass="md-footer-nav__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg></div><divclass=md-footer-nav__title><divclass=md-ellipsis><spanclass=md-footer-nav__direction> Previous </span> Miscellaneous </div></div></a><ahref=../multiple-ingress/class="md-footer-nav__link md-footer-nav__link--next"rel=next><divclass=md-footer-nav__title><divclass=md-ellipsis><spanclass=md-footer-nav__direction> Next </span> Multiple Ingress controllers </div></div><divclass="md-footer-nav__button md-icon"><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg></div></a></nav></div><divclass="md-footer-meta md-typeset"><divclass="md-footer-meta__inner md-grid"><divclass=md-footer-copyright> Made with <ahref=https://squidfunk.github.io/mkdocs-material/target=_blankrel=noopener> Material for MkDocs </a></div></div></div></footer></div><scriptsrc=../../assets/javascripts/vendor.93c04032.min.js></script><scriptsrc=../../assets/javascripts/bundle.83e5331e.min.js></script><scriptid=__langtype=application/json>{"clipboard.copy":"Copy to clipboard","clipboard.copied":"Copied to clipboard","search.config.lang":"en","search.config.pipeline":"trimmer, stopWordFilter","search.config.separator":"[\\s\\-]+","search.placeholder":"Search","search.result.placeholder":"Type to start searching","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.term.missing":"Missing"}</script><script>