<p>I want to understand what happens behind the scene if a liveness probe fails in kubernetes ?</p>
<p>Here is the context:</p>
<p>We are using <em>Helm Chart</em> for deploying out application in Kubernetes cluster.</p>
<p>We have a statefulsets and headless service. To initialize mTLS, we have created a <em>'job'</em> kind and in 'command' we are passing shell &amp; python scripts are an arguments.</p>
<p>We have written a <em>'docker-entrypoint.sh'</em> inside <em>'docker image'</em> for some initialization work.</p>
<p>Inside statefulSet, we are passing a shell script as a command in <em>'livenessProbe'</em> which runs every 30 seconds.</p>
<p>I want to know if my livenessProbe fails for any reason :
1. Does helm chart monitor this probe &amp; will restart container or it's K8s responsibility ?
2. Will my 'docker-entryPoint.sh' execute if container is restarted ?
3. Will 'Job' execute at the time container restart ?</p>
<p>How Kubernetes handles livenessProbe failure and what steps it takes?</p>

Pushpendra
<p>To answer your question liveness probe and readiness probe are actions basically get calls to your application pod to check whether it is healthy.
This is not related to helm charts.
Once the liveness or readiness probe fails container restart takes place .
I would say these liveness probes failure can affect your app uptime, so use a rolling deployment and autoscale your pod counts to enable availability.</p>
