<p>Batch computations, Monte Carlo, using Docker image, multiple jobs running on Google cloud and managed by Kubernetes. But it (replication controller, I guess?) managed to restart same computation again and again due to default restart policy.</p>

<p>Is there a way now to let pods die? Or maybe other workarounds to do pods garbage collection?</p>

<p>Now that v1.0 is out, better native support for getting the batch computations is one of the team's top priorities, but it is already quite possible to run them.</p>

<p>If you run something as a pod rather than as a replication controller, you can set the <a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/release-1.0/pkg/api/v1/types.go#L864" rel="nofollow"><code>restartPolicy</code></a> field on it. The <a href="https://github.com/GoogleCloudPlatform/kubernetes/blob/release-1.0/pkg/api/v1/types.go#L841" rel="nofollow"><code>OnFailure</code></a> policy is probably what you'd want, meaning that kubernetes will restart a pod that exited with a non-zero exit code, but won't restart a pod that exited zero.</p>

<p>If you're using <code>kubectl run</code> to start your pods, though, I'm unfortunately not aware of a way to have it create just a pod rather than a replication controller. If you'd like something like that, it'd be great if you <a href="https://github.com/GoogleCloudPlatform/kubernetes/issues/new" rel="nofollow">opened an issue</a> requesting it as an option.</p>
