<p>I am eagerly awaiting the release of Kubernetes v1.3 in mid to late June, so that I can access cron scheduling for jobs. In the meantime, what I plan to do is the following:</p>

<ul>
<li>Deploy a job on my Kubernetes cluster</li>
<li>Use jenkins as a cron tool to trigger the job in defined intervals (e.g. 1 hour).</li>
</ul>

<p>I have two questions:</p>

<p>How do I update a job? For replication controllers, I would simply do a rolling update, but in the jobs API spec (<a href="http://kubernetes.io/docs/user-guide/jobs/" rel="nofollow">http://kubernetes.io/docs/user-guide/jobs/</a>) there are no details about how to do this. For example, lets say that I want to use my jenkins deploy system to update the job whenever I do a git commit.</p>

<p>Is it possible to use the kubernetes API to trigger jobs? For example, I have a job that runs and then the pod is terminated on completion. Then, 1 hour later, I want to use jenkins to trigger the job again.</p>

<p>Thanks so much! </p>

<p>I am not sure if there is any fancy way to trigger a completed job, but one way to do it can be to delete and recreate the job.</p>

<p>Re: rolling-update: that is required for long running pods, which is what RCs control.
For jobs: You can update the podTemplateSpec in jobSpec and that will ensure that any new pod created  by the job after the update will have the updated podTemplateSpec (note: already running pods will not be affected).</p>

<p>Hope this helps!</p>
