<p>I have a docker image with a few python functions that I would like to execute using a K8 cronjob.</p>
<p>I added the docker image to the cronjob spec so the functions would be executed on a schedule.</p>
<p>Would it be necessary or beneficial if I created a container with the same docker image via a deployment spec that would follow the logs?</p>

PBandJ
<p>Depends on if you'd like to be able to use the logs for live debugging or not.</p>
<p>Every Job in Kubernetes creates a Pod, so essentially you can just look at the logs with:</p>
<pre class="lang-sh prettyprint-override"><code>kubectl logs &lt;pod-name&gt;
</code></pre>
<p>Another alternative is to stream your Pod logs to a logging tool like an <a href="https://medium.com/@prasenjitsarkar_79320/part-7-deploying-efk-elasticsearch-fluentd-kibana-stack-on-oke-f7b6122492f" rel="nofollow noreferrer">EFK</a> or <a href="https://github.com/elastic/helm-charts" rel="nofollow noreferrer">ELK</a> stack. Also, there are also many paid vendors that allow you send logs to the cloud, so that's another option.</p>
