<p>Is it possible to have a kubernetes job as init container for my kubernetes pod? </p>

<p>I want to start my kubernetes pod/ deployment only after the kubernetes job has successfully reached completed state. If above is not possible, is there any other way out? I can not use an external script to check <code>kubectl wait --for=condition=complete</code> etc and then start my pod.</p>

Ashish Vyas
<p>Yes, you can safely use the same pod spec in Init container, as you used before in Job object. If you need to implement more sophisticated workflows please take a look at Argo Workflow framework - for doing things done on Kubernetes. <a href="https://github.com/argoproj/argo/blob/master/examples/README.md#conditionals" rel="nofollow noreferrer">Here</a> is an example of Conditionals usage.</p>
