user1578872
user1578872

Reputation: 9028

Storing Kubernetes CronJob Logs in DB

My cronjob is configured to run every 30 mins. Is it possible to read and store the cronJob logs to DB? So, The requirement is to store each run in DB along with the status and logs for all the Jobs. This is required to show the Job History with status, duration & logs in a web based application.

Upvotes: 1

Views: 147

Answers (1)

Thomas
Thomas

Reputation: 12009

You have two options: Use an appropriate logging inside the pod that writes to a database (this has nothing to do with kubernetes) or log to stdout and use logging infrastructure that forwards the logs to a database or central log storage like ELK, graylog2 or product that your cloud provider offers.

Upvotes: 5

Related Questions