Jobs scheduling in Google Container Engine (Kubernetes)
I’m trying to create a Kubernetes scheduled job, however, I noticed that:
- On Kubernetes versions >= v1.4 it’s called ScheduledJob
- On Kubernetes versions >= v1.5 it’s called *CronJob
The default Kubernetes version running on Google Container Engine is v1.4.6 which means I should use ScheduledJob objects.
The problem is that ScheduledJob uses the batch/v2alpha1 API version which isn’t enabled on my Cluster so the job creation fails, on the other hand, creating a new cluster with Alpha Features enabled will only last for 30 days (Google automatically deletes it afterward).
Is there any production-ready solution to schedule jobs on Google Container Engine?
Below is the official response from Google Support:
As you’ve noticed, the scheduled jobs/cron jobs feature is currently
We realize this is a much-requested feature and are working to get it
production-ready in the future. Until then, there is unfortunately no
supported feature I can recommend for production.
One Solution collect form web for “Jobs scheduling in Google Container Engine (Kubernetes)”
The new default version for Google Container as today is Kubernetes v1.5.6 and you have the option to upgrade to v1.6.0. So it will be possible to create cron jobs.
If your cluster is on a previous version, you can upgrade your container cluster as described in here