How to create a Cronjob in spinnaker

4/24/2019

I created a cronJob using kubectl. I would like to manage this job using spinnaker but i cant find my created job in spinnaker.

I created the file running "kubectl create -f https://k8s.io/examples/application/job/cronjob.yaml"

This cronjob looks like this: https://k8s.io/examples/application/job/cronjob.yaml

-- mgg
kubernetes
kubernetes-cronjob
spinnaker

1 Answer

4/25/2019

There was an issue open on Github and based on recent comment on How do I deploy a CronJob? #2863

... At this time, there is no support for showing CronJobs on the cluster screen, which is intended to focus more on "server-like" resources rather than jobs. ...

As for deploying CronJobs in Spinnaker:

... was not possible prior to Spinnaker 1.8. It has been possible to deploy cron jobs since Spinnaker 1.8

Like @Amityo mentioned you can show deployed CronJobs using kubectl get cronjob, and if you like to list jobs scheduled by this CronJob you can use kubectl get jobs.

This is really well explained in official Kubernetes Documentation Running Automated Tasks with a CronJob.

-- Crou
Source: StackOverflow