<p>Here's my scenario,</p>

<p>I want to launch a Job in Kubernetes, the first container that runs will look through a list of custom resources, and launch each of the containers defined in that resource to completion.  I don't know whats in the list ahead of time, I only know when the job is kicked off.</p>

<p>Is this possible?  Can someone point me to something that shows how to do it?</p>

Zeus82
<p>You can use the <a href="https://kubernetes.io/docs/reference/using-api/client-libraries/" rel="nofollow noreferrer">Kubernetes Client Libraries</a> to create any Kubernetes resource from inside your code (given that it has the correct service account of course if RBAC is configured in your cluster).</p>

<p>If you want to run a container to completion, a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" rel="nofollow noreferrer">Kubernetes Job</a> would be the best fit.</p>
