<p>I would like to disable the logging of the health checks produced by my Ingress, on my pods.</p>

<p>I have a GCE ingress, distributing two pods, and I would like to clear up the logs i get from them.</p>

<p>Do you have any idea ?</p>

<p>Thanks,</p>

Simon Lacoste
<p>(It's not clear what do you mean by disabling logs. So I'll make an assumption.)</p>

<p>If your application is logging something when it gets a request, you can check the user agent of the request to disable requests from Google Load Balancer health checking.</p>

<p>When you provision a GCE ingress, your app will get a Google Cloud HTTP Load Balancer (L7). This LB will make health requests with header:</p>

<pre><code>User-agent: GoogleHC/1.0
</code></pre>

<p>I recommend checking for a case-insensitive header ("user-agent") and again a case-insenstive check to see if its value is starting with "googlehc".</p>

<p>This way, you can distinguish Google HTTP (L7) load balancer health requests and leave them out of your logs.</p>
