<p>I have some apps in production working in Azure. All these applications belong to the same company and communicate with each other. I want to migrate them to Kubernetes.</p>

<p><strong>My question is:</strong> What are the best practices in this case and why ?</p>

<p>Some peoples recommend one cluster and multiples namespaces and I don't know why.</p>

<p>For example: <a href="https://www.youtube.com/watch?v=xygE8DbwJ7c" rel="noreferrer">https://www.youtube.com/watch?v=xygE8DbwJ7c</a> recommends apps within a cluster doing intra-cluster multi-tenancy but the arguments of this choice are not enough for me.</p>

ivangalbans
<blockquote>
  <p><strong>My question is:</strong> What are the best practices in this case? and why ?</p>
</blockquote>

<p>Answer is: it depends...</p>

<p>To try to summarize it from our experience:</p>

<ul>
<li><p>Cluster for each app is usually quite a bit waste of resources, especially giving HA clusters requirements, and it can mainly be justified in case when single app is comprised of larger number of microservices that are naturally clustered together or when some special security considerations has to be taken into account. That is, however, in our experience, rare the case (but it depends)... </p></li>
<li><p>Namespaces for apps in a cluster are more in line with our experience and needs, but again, this should not be overdone either (so, again it depends) since, for example your CNI can be bottleneck leading to one rogue app (or setup) degrading performance for other apps in seemingly unrelated case. Loadbanalcing and rollout downtimes, clashes for resources and other things can happen if all is crammed into one cluster at all cost. So this has it's limits as well.</p></li>
<li><p>Best of both worlds - we started with single cluster, and when we reached naturally separate (and separately performant) use cases (say, qa, dev, stage environments, different client with special security considerations etc) we migrated to more clusters, keeping in each cluster reasonably namespaced apps.</p></li>
</ul>

<p>So all in all: depending on available machine pool (number of nodes), size of the cluster, size of apps themselves (microservice/service complexity), HA requirements, redundance, security considerations etc.... you might want to fit all into one cluster with namespaced apps, then again maybe separate in several clusters (again with namespaced apps within each cluster) or keep everything totally separate with one app per cluster. So - it depends.</p>
