<p>I'm using Kubernetes into  google cloud platform and have defined some clusters  with deployment controllers there.</p>
<p>For each pod into deployment there is a health check which  each 30sec check my route(<a href="http://www.example.com" rel="nofollow noreferrer">www.example.com</a>) and the response must be 200 else it cause the health check goes fail.</p>
<p>So i decided to  trace it and write die() in my index.php then health check show green status and it works correctly.
I got confused and i really do not know what happened for this pod and why it does not work.</p>
<p>Could anybody help my to find this issue in my pod and tell me what is exactly this health check doing in GCP?</p>

EmyNikhil
<p>health check used to verify if a container in a pod is healthy and ready to serve traffic.</p>

<p>So you should check your http status code at first:</p>

<blockquote>
  <p>curl -I www.example.com</p>
</blockquote>

<p>What is your http status code in the response?</p>

<p>when you write die() in your index.php then i am sure http status code is 200</p>

<p>but when you remove it from your index.php then http code is something else!</p>

<p>you may redirect user after visitign www.example.com then in this case  http status code is not 200.</p>

<p>make sure and check http status code of  health check url is 200 , if it is not 200 then you could change health check url in GKE to something else which http status code could be 200.</p>
