I saw the kubelet exposes
probe_duration_seconds from version 1.25 prober package - k8s.io/kubernetes/pkg/kubelet/prober - Go Packages but I think this is tracking the duration in a per request level, but I’m interested in how much it takes for the pod from the moment the container is started until it answers k8s that is ready to receive traffic.
As a naive attempt to measure that meanwhile, I’m writing the result of this command
date +%s to a file as part of the CMD statement in my Dockerfile and doing the diff against System/currentTimeMillis when the endpoint configured as readiness probe is called. But I would like to have something more trustworthy.