<p>I have a simple <code>Flink</code> job that reads from an ActiveMQ source &amp; sink to a database &amp; print. I deploy the job in the Kubernetes with 2 <code>TaskManagers</code>, each having <code>Task Slots</code> of 10 (<code>taskmanager.numberOfTaskSlots: 10</code>). I configured parallelism more than the total <code>TaskSlots</code> available (ie., 10 in this case).</p>

<p>When I see the <code>Flink Dashboard</code> I see this job runs only in one of the TaskManager, but the other TaskManager has no Jobs. I verified this by checking every operator where it is scheduled, also in <code>Task Manager</code> UI page one of the manager has all slots free. I attach below images for reference. </p>

<p>Did I configure anything wrong? Where is the gap in my understanding? And can someone explain it?</p>

<p><a href="https://i.stack.imgur.com/o2Afd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o2Afd.png" alt="enter image description here"></a></p>

<p><strong>Job</strong><a href="https://i.stack.imgur.com/y2FBh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2FBh.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/hr3kh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hr3kh.png" alt="enter image description here"></a></p>

vvra
<p>The first task manager has enough slots (10) to fully satisfy the requirements of your job. </p>

<p>The scheduler's default behavior is to fully utilize one task manager's slots before using slots from another task manager. If instead you would prefer that Flink spread out the workload across all available task managers, set <code>cluster.evenly-spread-out-slots: true</code> in <code>flink-conf.yaml</code>. (This option was added in Flink 1.10 to recreate a scheduling behavior similar to what was the default before Flink 1.5.)</p>
