<p>I have my current application batches developed on Spring Batch framework. Now I need to forklift the same to a Kubernetes platform for cloud nativity. Please help me with the following queries.</p>
<ol>
<li>How do I achieve auto scaling (HPA) for the spring batches.</li>
<li>Whether spring batch remote partitioning is the recommended approach for auto scaling in k8s
platform and any best practices for this approach. Like how to effectively scale-up and scale-down
etc.</li>
<li>What are the advantages of refactoring the current spring batch over Spring Cloud Task. Is this a
best practice for cloud compliance.</li>
</ol>
<p>Thanks</p>
<p><strong>UPDATE</strong><br />
while choosing spring batch remote partitioning - whether worker containers should be configured over k8s deployment(pods) or k8s jobs. Any recommended approach ?</p>
<p>do we have hpa/autoscaling for k8s jobs ?</p>
<p>spring batch remote partitioning over k8s platform which is better - using MessagingPartitionHandler+k8s jobs(worker queue pattern) or (DeployerPartitionHandler+KubernetesTaskLauncher) ?</p>

<blockquote>
<p>do we have hpa/autoscaling for k8s jobs ?</p>
</blockquote>
<p>No. There is a concept of Jobs Parallelism, but it is not quite the HPA.</p>
<p>If you have a continuous stream of background processing work to run (so work queue Jobs don't fit you), then consider running your background workers with a ReplicaSet instead, and consider running a background processing library such as <a href="https://github.com/resque/resque" rel="nofollow noreferrer">https://github.com/resque/resque</a>.</p>
<p>A ReplicaSet can also be a target for Horizontal Pod Autoscalers (HPA). That is, a ReplicaSet can be auto-scaled by an HPA.</p>
