<p>Is there a way to check the last time the liveness &amp; readyness checks are done and what are the results of the same.</p>

<p>I check by doing</p>

<p><code>kubectl get pod my-pod -o yaml</code></p>

<p>The status section shows up like this but does not tell when the kubelet ran the health checks</p>

<pre><code>  conditions:
  - lastProbeTime: null
    lastTransitionTime: 2019-09-17T10:38:20Z
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: 2019-09-17T10:38:35Z
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: 2019-09-17T10:38:35Z
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: 2019-09-17T10:38:20Z
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: docker://&lt;some link&gt;
    image: nginx:latest
    imageID: someid
    lastState: {}
    name: nginx
    ready: true
    restartCount: 0
    state:
      running:
        startedAt: 2019-09-17T10:38:22Z
  hostIP: 172.18.3.8
  phase: Running```
</code></pre>

randominstanceOfLivingThing
<p>A Pod is considered ready when all of its Containers are ready. One use of this signal is to control which Pods are used as backends for Services. When a Pod is not ready, it is removed from Service load balancers.The kubelet uses readiness probes to know when a Container is ready to start accepting traffic.</p>

<p>you can use kubectl describe pod liveness-exec to view the pod events. The output should indicates if the liveness probes have failed. You can get more details on this from <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="nofollow noreferrer">Kubernetes.io</a></p>

<p>Additionally, a Pod has a PodStatus, which has an array of <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions" rel="nofollow noreferrer">PodConditions</a> through which the Pod has or has not passed. </p>

<p>Two of the elements are </p>

<ul>
<li>The lastProbeTime field provides a timestamp for when the Pod
condition was last probed.</li>
<li>The lastTransitionTime field provides a timestamp for when the Pod
last transitioned from one status to another</li>
</ul>
