<p>I have a kubernetes (0.15) cluster running on CoreOS instances on Amazon EC2</p>

<p>When I create a service that I want to be publicly accessible, I currently add some private IP addresses of the EC2 instances to the service description like so:</p>

<pre><code>{
  "kind": "Service",
  "apiVersion": "v1beta3",
  "metadata": {
    "name": "api"
  },
  "spec": {
    "ports": [
      {
        "name": "default",
        "port": 80,
        "targetPort": 80
      }
    ],
    "publicIPs": ["172.1.1.15", "172.1.1.16"],
    "selector": {
      "app": "api"
    }
  }
}
</code></pre>

<p>Then I can add these IPs to an ELB load balancer and route traffic to those machines.</p>

<p>But for this to work I need to have a maintain the list of all the machines in my cluster in all the services that I am running, which feels wrong.</p>

<p>What's the currently recommended way to solve this? </p>

<ul>
<li>If I know the PortalIP of a service is there a way to make it routable in the AWS VPC infrastructure? </li>
<li>Is it possible to assign external static (Elastic) IPs to Services and have those routed?</li>
</ul>

<p>(I know of <code>createExternalLoadBalancer</code>, but that does not seem to support AWS yet)</p>

<p>If someone will reach this question then I want to let you know that external load balancer support is available in latest kubernetes version.</p>

<p><a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" rel="nofollow noreferrer">Link to the documentation</a></p>
