title: k8s - livenessProbe vs readinessProbe
body: <p>Consider a pod which has a healthcheck setup via a http endpoint <code>/health</code> at port 80 and it takes almost 60 seconds to be actually ready &amp; serve the traffic.</p>
  
  <pre><code>readinessProbe:
    httpGet:
      path: /health
      port: 80
    initialDelaySeconds: 60
  livenessProbe:
    httpGet:
      path: /health
      port: 80
  </code></pre>
  
  <p><strong>Questions:</strong></p>
  
  <ul>
  <li>Is my above config correct for the given requirement? </li>
  <li>Does liveness probe start working only after the pod becomes ready ? In other words, I assume readiness probe job is complete once the POD is ready. After that livenessProbe takes care of health check. In this case, I can ignore the <code>initialDelaySeconds</code> for livenessProbe.  If they are independent, what is the point of doing livenessProbe check when the pod itself is not ready! ?</li>
  <li>Check this <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/" rel="noreferrer">documentation</a>. What do they mean by </li>
  </ul>
  
  <blockquote>
    <p>If you want your Container to be able to take itself down for
    maintenance, you can specify a readiness probe that checks an endpoint
    specific to readiness that is different from the liveness probe.</p>
  </blockquote>
  
  <p>I was assuming, the running pod will take itself down only if the livenessProbe fails. not the readinessProbe. The doc says other way. </p>
  
  <p>Clarify!</p>