Callback from K8 APIs?

We’re planning to build a ‘Job Monitoring system’ for the jobs that run on Kubernetes. We are planning to use K8 APIs for this. Once a job starts on K8 we want to insert a row on one of our tables with some info about this job such as ‘start time’ etc. Once the job completes, either successfully or not, we want the same row to get updated with ‘end time’ etc.

We know we can do this by modifying code for each job but we’re trying to avoid making changes to each job. Hoping we can do this only in one central place by using “callbacks” or some such technique. Is there any way to do this in K8?

This is what the WATCH API is for. You can write a small app which watches whatever resources you like and notifies your backend.