How to measure a kubernetes container startup time?

3/19/2020

I need this information to measure mean time to recovery (MTTR). I have tried using different kube-state-metrics but it does not seem to help much. Any hints on measuring MTTR will also be appreciated

-- Ayush Dewan
kubernetes
prometheus

1 Answer

3/19/2020

You can use the pod status information, it records last transition time for each status signal. In this case you probably want the time difference between PodScheduled and Ready, but up to you to decide what counts as "startup time" or not (for example, does the time spent on pulling container images count?).

-- coderanger
Source: StackOverflow