<p>I have a nginx server outside kubernetes. <code>nginx -&gt; nginx ingress</code>. I want know how add a custom health check path <code>/health/status</code> to nginx ingress. </p>

quanwei li
<p><em>This question is almost certainly solving the wrong problem, but in the spirit of answering what was asked:</em></p>

<p>You can expose the Ingress <code>/healthz</code> to the outside world:</p>

<pre><code>kind: Service
metadata:
  name: ingress-nginx-health
spec:
  type: ClusterIP
  selector: # whatever
  ports:
  - name: healthz
    port: 80
    targetPort: 10254
---
kind: Ingress
spec:
  rules:
  - host: elb-1234.example.com
    http:
      path: /healthz
      backend:
        serviceName: ingress-nginx-health
        servicePort: healthz
</code></pre>

<p>Because if your Ingress controller falls over, it will for sure stop answering its own healthz check</p>
