<p>I am trying to create a system health check. I would like to be able to determine how often the pods are restarting. Since the pods have liveness probes, they may continuously restart if something is wrong. Is there anyway to check the time a pod restarted at instead of just the number of restarts and the total time the pod has been alive? </p>

beanwa
<p>You may want to use a <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/" rel="nofollow noreferrer">monitoring tool</a>, like cAdvisor/Heapster/Grafana/Prometheus.</p>

<p>Another option you have is to deploy the <a href="https://github.com/kubernetes/kube-state-metrics" rel="nofollow noreferrer">kube-state-metrics container</a>.</p>

<p>Good articles to read: <a href="https://sysdig.com/blog/monitoring-kubernetes-with-sysdig-cloud/" rel="nofollow noreferrer">Monitoring Kubernetes</a> and <a href="https://akomljen.com/get-kubernetes-cluster-metrics-with-prometheus-in-5-minutes/" rel="nofollow noreferrer">Get Kubernetes Cluster Metrics with Prometheus</a>.
Also, read a similar question on <a href="https://stackoverflow.com/questions/41452930/how-can-i-alert-for-container-restarted">stackoverflow</a>.</p>
