Kubernetes Lab 8 - Cron Jobs
Problem
Your commander has a simple data process that is run periodically to check status. They would like to stop doing this manually in order to save time, so you have been asked to implement a cron job in the Kubernetes cluster to run this process.
- Create a cron job called xwing-cronjob using the
ibmcase/xwing-status:1.0image. - Have the job run every second minute with the following cron expression:
*/2 * * * *. - Pass the argument
/usr/sbin/xwing-status.shto the container.
Verification
- Run
kubectl get cronjobs.batchandLAST-SCHEDULEto see last time it ran - From a bash shell, run the following to see the logs for all jobs: