<p>In Kubernetes configuration, for external service component we use:</p>
<pre><code>type: LoadBalancer
</code></pre>
<p>If we have k8s cluster running inside a cloud provider like AWS, which provides it own loadbalancer, how does all this work then? Do we need to configure so that one of these loadbalancers is not active?</p>

<p>AWS now takes over the open source project: <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller" rel="nofollow noreferrer">https://kubernetes-sigs.github.io/aws-load-balancer-controller</a></p>
<p>It works with EKS(easiest) clusters as well as <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/deploy/installation/" rel="nofollow noreferrer">non-EKS clusters</a>(need to install aws vpc cni etc to make <code>IP</code> target mode work, which is required if you have a peered VPC environment.)</p>
<p>This is the official/native solution of managing AWS LB(aka ELBv2) resources(App ELB, Network ELB) using K8s. Kubernetes in-tree controller always reconciles <code>Service</code> object with <code>type: LoadBalancer</code></p>
<p>Once configured correctly, AWS LB controller will manage the following 2 types of LBs:</p>
<ol>
<li>Application LB, via Kubernetes <code>Ingress</code> object. It operates on L7 and provides features related to HTTP</li>
<li>Network LB, via Kubernetes <code>Service</code> object with <a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/guide/service/nlb/" rel="nofollow noreferrer">correct annotations</a>. It operates on L4 and provides less features but claimed MUCH higher throughput.</li>
</ol>
<p>To my knowledge, this works best when used with <code>external-dns</code> together -- it automatically updates your Route53 record with your LB A records thus makes the whole service discovery solution k8s-y.</p>
<p>Also in general, should prevent usage of classic ELB, as it's marked as deprecated by AWS.</p>
