<p>From the official AWS documentation, I get the following:</p>
<blockquote>
<p>AWS treats Regions and Availability Zones as failure domains that should be accounted for when running infrastructure that needs to be highly available.</p>
</blockquote>
<blockquote>
<p>Each Region where your application is deployed should run in multiple Availability Zones (AZ) to ensure routing traffic across two or more failure domains.</p>
</blockquote>
<p>But it is not stated that the nodes are spread evenly across AZs of one region. Meaning that if you have 3 AZs in one region and deploy 3 nodes, each node will be deployed to a different availability zone to ensure high availability.</p>
<p>Is that automatically managed by AWS EKS, i.e the nodes are spread evenly across availability zones. Or is there a config that we can set to ensure that?</p>

YanaT
<p>EKS won't work to spread nodes out across AZ's.  EKS doesn't concern itself with nodes or rather nodegroups so much. Heck, it doesn't even know what workloads it's going to be scheduling. EKS is just providing the K8s control plane.</p>
<p>Instead, you need to build a nodegroup in each AZ that's part of the cluster.  These can be size 0 nodegroups.  Then with proper affinity/anti-affinity rules for your pods OR using <code>topologySpreadConstraints</code> you  can help ensure that pods get scheduled evenly across nodes in different AZ's.</p>
<p>Let <code>cluster-autoscaler</code> handle the adding and removal of nodes in these nodegroups (especially when using HPA)</p>
<p>Depending on how you are creating the EKS cluster will determine how you create the nodegroups.  <code>eksctl</code> for example you can define these all in a <code>ClusterConfig</code> file.</p>
