Kubernetes (K8s) - Can you check what time a pod restarts at?

8/20/2018

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?

-- beanwa
kubernetes
kubernetes-health-check

1 Answer

8/21/2018

You may want to use a monitoring tool, like cAdvisor/Heapster/Grafana/Prometheus.

Another option you have is to deploy the kube-state-metrics container.

Good articles to read: Monitoring Kubernetes and Get Kubernetes Cluster Metrics with Prometheus. Also, read a similar question on stackoverflow.

-- VKR
Source: StackOverflow