I need to create a Cron jobs at K8S.
some jobs runs every minute , some of them every 5 minutes (24/7)
This jobs need to run rest call (get) to some components and to check the availability and if something is wrong (post) a rest call to other system
To handle this task I currently see two approaches
-
Create k8s cronjob - which is native k8s CRD and use
shell script
for it, https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
PROS is using K8S native way to handle such issue
CONS - very hard to debug, logs debug etc
- Create k8s job/cronjob - which execute run a Golang program that will do use following library as cronjob
PROS - debug , logging etc , https://github.com/robfig/cron
CONS - create some abstraction …
Any suggestion, recommendation which is better approach to use If I need a full control on those jobs