<p>I’m working with a Spring Boot application.
And I have included the http liveness probe config using REST API endpoint.
So, whenever the REST API is inaccessible, then Kubernetes will restart the pod.</p>
<p>The question is, I need identify if there is anyway to differentiate the pod restart activity was triggered by Liveness Probe against the manual restarts done by deployment team.</p>
<p>Is there any kind of log message included by Kubernetes in the Spring Boot log whenever it restarts the pod?</p>

Tariv
<p>If you describe the pod you should see a message <code>Liveness probe failed</code> if there was a liveness probe failure.</p>
<pre><code>kubectl describe pod liveness-exec

FirstSeen LastSeen    Count   From            SubobjectPath           Type        Reason      Message
--------- --------    -----   ----            -------------           --------    ------      -------
37s       37s     1   {default-scheduler }                    Normal      Scheduled   Successfully assigned liveness-exec to worker0
36s       36s     1   {kubelet worker0}   spec.containers{liveness}   Normal      Pulling     pulling image &quot;k8s.gcr.io/busybox&quot;
36s       36s     1   {kubelet worker0}   spec.containers{liveness}   Normal      Pulled      Successfully pulled image &quot;k8s.gcr.io/busybox&quot;
36s       36s     1   {kubelet worker0}   spec.containers{liveness}   Normal      Created     Created container with docker id 86849c15382e; Security:[seccomp=unconfined]
36s       36s     1   {kubelet worker0}   spec.containers{liveness}   Normal      Started     Started container with docker id 86849c15382e
2s        2s      1   {kubelet worker0}   spec.containers{liveness}   Warning     Unhealthy   Liveness probe failed: cat: can't open '/tmp/healthy': No such file or directory
</code></pre>
