<p>How can I publish a service in an AWS kubernetes cluster at a permanent IP address, so that I can add a DNS record? I define service <code>xxx</code> of type <code>LoadBalancer</code> in kubernetes, and <code>kubectl describe service xxx</code> gives me something like: </p>

<pre><code>LoadBalancer Ingress:   aae55ce563ca611e692c10a83aef9ddc-467886677.eu-west-1.elb.amazonaws.com
Port:           &lt;unset&gt; 9004/TCP
</code></pre>

<p>Indeed, I can access the application on aae55ce563ca611e692c10a83aef9ddc-467886677.eu-west-1.elb.amazonaws.com:9004. How can I make this a permanent IP address?</p>

<p>As @error2007s said, you can't get a static IP for ELB. But if all you want is to assign a domain name to your ELB, then you can use a CNAME record pointing to <code>aae55ce563ca611e692c10a83aef9ddc-467886677.eu-west-1.elb.amazonaws.com</code>. If you're using Route53 you can also define an alias for better performance. Create a record set under your hosted zone, choose type <code>A</code>, select Yes under "Alias: ", and finally select your ELB from the dropdown box.</p>

<p>Both options are documented by Amazon:</p>

<p><a href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/using-domain-names-with-elb.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/using-domain-names-with-elb.html</a></p>
