How to measure containers execution time inside a kubernetes POD?

7/18/2018

I am running a jobs with a kubernetes POD and I need to measure the execution time for each job .

I want to get it through some api.

Does anyone know how can I get it ?

-- Gofrane Haj Ahmed
api
jobs
kubernetes
pod

1 Answer

7/18/2018

A job has a property denominated status of type JobStatus.

The properties which you are looking for in the JobStatus type is the startTime and the completionTime, which as the name suggest are responsible for indicating the moment where the job started/completed. The difference between these values is going to lead you to the duration of the execution of the job.

-- André B
Source: StackOverflow