title: Kubernetes, scaling cronjob pod to a different node
body: <p>We have a single kubernetes cronjob, which task is to detect a newly uploaded file, and perform some operations on it. This operation runs every minute, and may take 10 minutes to complete.</p>
  
  <p>At the moment it works, and it creates new pods for jobs as new files are detected. However, we would like a pod, created by the cronjob, to be spawned onto a different Node. At this stage, all of my pods are spawned in the same node, which may cause my EC2 instance to crash in a worst-case scenario where there are a lot of new files and my system runs our of memory.</p>
  
  <p>I am using an EFS filesystem to share files amongst my different Nodes, so all nodes can read the uploaded files. </p>
  
  <p>How do I go about letting new pods get spawned on different nodes using kubernetes cronjobs?</p>