<p>We're serving our product on AWS EKS where the service is created of type <code>LoadBalancer</code>. The ELB IP is assigned by AWS and this is what is being shared to the client.</p>
<p>However, when we re-deploy the service when we're making some changes/improvements, the ELB IP changes. Since this is causing us to frequently send mails to all the clients, we would need a dedicated IP which needs to be mapped to LB and thus will not change with re-deployment of the service.</p>
<p>Any existing AWS solution or a nice pointer to solve this situation would be helpful.</p>

cai
<p>You can use elastic ip as is described here <a href="https://stackoverflow.com/questions/66902641/how-to-provide-elastic-ip-to-aws-eks-for-external-service-with-type-loadbalancer">How to provide elastic ip to aws eks for external service with type loadbalancer?</a>, and here <a href="https://docs.aws.amazon.com/es_es/eks/latest/userguide/network-load-balancing.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/es_es/eks/latest/userguide/network-load-balancing.html</a>, just adding an anotation <code>service.beta.kubernetes.io/aws-load-balancer-eip-allocations: eipalloc-xxxxxxxxxxxxxxxxx,eipalloc-yyyyyyyyyyyyyyyyy</code> to the nlb:</p>
<p><code>service.beta.kubernetes.io/aws-load-balancer-eip-allocations: eipalloc-05666791973f6a240</code></p>
<p>Another way is to use a domain name (my way). Then use <a href="https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md</a> annotations to link your Service or Ingress with a dns name and configure <code>external-dns</code> to use your dns provider like Route53.</p>
<p>For example:</p>
<pre><code>---
apiVersion: v1
kind: Service
metadata:
  name: ambassador
  namespace: ambassador
  annotations:
    external-dns.alpha.kubernetes.io/hostname: 'myserver.mydomain.com'
</code></pre>
<p>Every time your LoadBalancer changes the ip the dns server will be updated by the correct ip.</p>
