<p>Kubernetes support <code>load-balancing</code>.</p>
<p>Let's take a simple senario:</p>
<ul>
<li>Process runs on one node</li>
<li>That process creates multiple processes</li>
<li>Do all new processes will run on same Kubernetes node ? or on multiple nodes (while supporting load-balancing ? )</li>
</ul>
<p>simple example:</p>
<pre><code>from multiprocessing import Pool

def f(x):
    return x*x

if __name__ == '__main__':
    with Pool(5) as p:
        print(p.map(f, [1, 2, 3])
</code></pre>
<p>In the example above, we are creating 3 processes.</p>
<ul>
<li>Do all the 3 processes run on same k8s node ? or it may be that 2 processes run on one node and the third process will run on the third node ?</li>
</ul>

user3668129
<p>I think you don't quite understand docker yet. Since a container contains this application, all of the memory/executions will be done in this container only, with or without K8s.</p>
<p>K8s only serves as a docker orchestrator for multiple containers, which normally, there should not be any communication at all between containers.</p>
<p>So the answer is all of the processes it created in the same node will be executed on that particular node only.</p>
