<p>Hi I try to use custom health check with GCP LoadBalancer.</p>

<p>I have added <code>readinessProbe</code> &amp; <code>livenessProbe</code> like this:</p>

<pre><code>    readinessProbe:
      httpGet:
        path: /health
        port: dash
      initialDelaySeconds: 5
      periodSeconds: 1
      timeoutSeconds: 1
      successThreshold: 1
      failureThreshold: 10
    livenessProbe:
      httpGet:
        path: /health
        port: dash
      initialDelaySeconds: 5
      periodSeconds: 1
      timeoutSeconds: 1
      successThreshold: 1
      failureThreshold: 10
</code></pre>

<p>But when I create my ingress I haven't got my custom health check</p>

<p><a href="https://i.stack.imgur.com/OwVxq.png" rel="nofollow noreferrer">Path LB</a></p>

M.Hol
<p>I <strong>FINALIZED</strong> an answer. What I was trying to do was impossible. My GCE Ingress used a backend on port <code>80</code> . But in my ReadinessProbe I told him to check on port <code>8080</code> and on the <code>/health</code> path. <strong>This is impossible!</strong></p>

<p>The port of the service declared in the Ingress backend must be the same as that declared in the <code>readinessProbe</code>. <strong>Only the path can be different</strong>. If we do not respect this pattern, it is <code>/</code> that is associated with the Health Check GCP path.</p>

<p>From a network point of view this is logical, the Health Check GCP is "out" of the Kube cluster, if we tell it to route on port <code>80</code> but our <code>ReadinessProbe</code> is on another port, how it can ensure that even if the port associated with the ReadinessProbe meets port <code>80</code> (which is the one on which it must route traffic) also respond.</p>

<p><strong>In summary, the port of the backend declared in Ingress must have a <code>readinessProbe</code> on the same port. The only thing we can customize is the path.</strong></p>
