<p>From the K8S document about <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="nofollow noreferrer">Configure liveness, readiness probes</a>, suppose the values of <code>successThreshold</code> and <code>failureThreshold</code> are little big, and probes fail to meet the bar of <code>successThreshold</code> and <code>failureThreshold</code> at the same time when pods run at the very beginning, what status of pods should be then?</p>

ucdream
<p>I guess you don't fully understand readiness and liveness probe.</p>

<p><strong>Readiness Probe</strong></p>

<blockquote>
  <p>Readiness probes are designed to let Kubernetes know when your app is ready to serve traffic. Kubernetes makes sure the readiness probe passes before allowing a service to send traffic to the pod. If a readiness probe starts to fail, Kubernetes stops sending traffic to the pod until it passes.</p>
</blockquote>

<p>Also as per official Kubernetes <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes" rel="nofollow noreferrer">docs</a>.</p>

<blockquote>
  <p>If the readiness probe fails, the endpoints controller removes the Pod’s IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is Failure. If a Container does not provide a readiness probe, the default state is Success.</p>
</blockquote>

<p>For example, if your application needs about 15 seconds since it will work correctly, needs to load huge amount of data you can set <code>readinessProbe</code>. It's helpful when you are scaling your deployment or need a while before Pod will receive data. </p>

<p>For a readiness probe, the <code>failureThreshold</code> value defines how many times the probe must fail before the pod is removed from the endpoint list.</p>

<p><strong>Liveness Probe</strong></p>

<blockquote>
  <p>Liveness probes let Kubernetes know if your app is alive or dead. If you app is alive, then Kubernetes leaves it alone. If your app is dead, Kubernetes removes the Pod and starts a new one to replace it.</p>
</blockquote>

<p>In short, when your application is running, Kubernetes is checking in time periods wheter it can access some shares, if yes, it returns success. If not, it counting it as fail and tries again, till probe will reach <code>failureThreshold</code>. After reaching this value, pod will be restarted.</p>

<p>===</p>

<p>Based on the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command" rel="nofollow noreferrer">docs example</a>.</p>

<p>readinessProbe when it will be successful:</p>

<pre><code>readiness-exec   0/1   Pending   0     0s
readiness-exec   0/1   Pending   0     0s
readiness-exec   0/1   ContainerCreating   0     0s
readiness-exec   0/1   Running   0     8s
readiness-exec   1/1   Running   0     15s
readiness-exec   0/1   Completed   0     98s
</code></pre>

<p>readinessProbe when it will fail:</p>

<pre><code>readiness-exec   0/1   Pending   0     0s
readiness-exec   0/1   Pending   0     0s
readiness-exec   0/1   ContainerCreating   0     0s
readiness-exec   0/1   Running   0     3s
readiness-exec   0/1   Completed   0     92s
</code></pre>

<p>It will not create pod as readinessProbe failed. In description of the pod:</p>

<pre><code>Warning  Unhealthy  2s (x12 over 57s)  kubelet, gke-default-pool-bc1968b0-1sh7  Readiness probe failed: cat: /tmp/healthyyyyy: No such file or directory
</code></pre>

<p>Regarding livenessProbe when it reach <code>failureThreshold</code> container will do what was set in <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy" rel="nofollow noreferrer">RestartPolicy</a>.</p>

<p>As information generated by probes are stored in kubelet you can describe pod to check current status. If you want to get more detailed information, you have to use <code>$ journalctl -u kubelet</code> like in <a href="https://stackoverflow.com/a/59543375/11148139">this case</a>.</p>

<p>You can find many articles online about this. For example <a href="https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-setting-up-health-checks-with-readiness-and-liveness-probes" rel="nofollow noreferrer">google article</a> or <a href="https://blog.openshift.com/liveness-and-readiness-probes/" rel="nofollow noreferrer">openshift article</a>.</p>

<p>Check <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#when-should-you-use-a-liveness-probe" rel="nofollow noreferrer">this docs</a> with information, when use probes.</p>

<p>If this didn't answer, please edit your question.</p>
