<p>I have a queue which filled (consistently) with work-item by one of my k8s pod.</p>

<p>I want to use k8s job to process each work item as I want each job to be handle by new pod as I want to use multiple container as suggest <a href="https://stackoverflow.com/a/46880653/963701">here</a>, but jobs don't seem to support an infinite number of completions.</p>

<p>When I use <code>spec.completions: null</code> I got BackoffLimitExceeded.</p>

<p>Any Idea how to implement job without the need to specify the number of work item?</p>

<p>Is there alternative to job for implementing background worker in k8s ?</p>

<p>Thank you</p>

MoShe
<p>My suggestion is to use Kubernetes resources in the way they have been designed: <em>Job</em> resources are one-off tasks that can ben triggered many times but they differ from the <em>background jobs</em> you're eager to implement.</p>

<p>If your application is <em>popping</em> jobs from a queue/backend, it's better to put in a Deployment with a <code>for</code> loop (YMMV according to programming language) and, eventually, scale it to down with another component if you don't want to allocate unused resources.</p>

<p>Another solution could be the specialization of each Job, using UUID as the name of the jobs and labelling them in order to group them: anyway, first suggestion of <em>using Kubernetes in the Kubernetes way</em> is strongly recommended.</p>
