<p>I have a simple app that I need to deploy in K8S (running on AWS EKS) and expose it to the outside world.</p>
<p>I know that I can add a service with the type LoadBalancer and viola K8S will create AWS ALB for me.</p>
<pre><code>spec:
  type: LoadBalancer
</code></pre>
<p>However, the issue is that it will <strong>create</strong> a new LB.</p>
<p>The main reason why this is an issue for me is that I am trying to separate out infrastructure creation/upgrades (vs. software deployment/upgrade). All of my infrastructures will be managed by Terraform and all of my software will be defined via K8S YAML files (may be Helm in the future).</p>
<p>And the creation of a load balancer (infrastructure) breaks this model.</p>
<p>Two questions:</p>
<ul>
<li><p>Do I understand correctly that you can't change this behavior (<strong>create</strong> vs. <strong>use existing</strong>)?</p>
</li>
<li><p>I read multiple articles about K8S and all of them lead me into the direction of Ingress + Ingress Controller. Is this the way to solve this problem?</p>
</li>
</ul>
<p>I am hesitant to go in this direction. There are tons of steps to get it working and it will take time for me to figure out how to retrofit it in Terraform and k8s YAML files</p>

Victor Ronin
<p>Short Answer , you can only change it to &quot;<strong>NodePort</strong>&quot; and couple the existing LB manually by adding EKS nodes with the right exposed port.</p>
<p>like</p>
<pre><code>spec:
  type: NodePort
  externalTrafficPolicy: Cluster
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: http
      nodePort: **30080**
</code></pre>
<p>But to attach it like a native, that is not supported by AWS k8s Controller yet and may not be a priority to do support such behavior as :</p>
<ul>
<li>Configuration: Controllers  get configuration from k8s config maps or  special CustomResourceDefinitions(CRDs) that will conflict with any manual
config on the already existing LB and my lead to wiping existing configs as not tracked in configs source.</li>
</ul>
<hr />
<p>Q: Direct expose or overlay ingress :</p>
<blockquote>
<p>Note: Use ingress ( Nginx or AWS ALB ) if you have (+1) services to expose or you need to add controls on exposed APIs.</p>
</blockquote>
