<p>I use a python script to insert data in my database (using pandas and sqlalchemy). The script read from various sources, clean the data and insert it in the database. I plan on running this script once in a while to completely override the existing database with more recent data.</p>
<p>At first I wanted to have a single service and simply add an endpoint that would require higher privileges to run the script. But in the end that looks a bit odd and, more importantly, that python script is using quite a lot of memory (~700M) which makes me wonder how I should configure my deployment.</p>
<p>Increasing the memory limit of my pod for this (once in a while) operation looks like a bad idea to me, but I'm quite new to Kubernetes, so maybe I'm wrong. Thus this question.</p>
<p>So what would be a good (better) solution? Run another service just for that, simply connect to my machine and run the update manually using the python script directly?</p>

<p><strong>To run on demand</strong>
<a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/job/</a>.
This generates a <code>Pod</code> that runs till completion (exit) only once - a <code>Job</code>.</p>
<p><strong>To run on schedule</strong>
<a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/</a>.
Every time when hitting a schedule, this generates the new, separate <code>Job</code>.</p>
