<p>I am experimenting with a <code>kubernetes</code> cluster on <code>aws</code>.</p>

<p>At the end of the day, I want to expose 2 urls:</p>

<ul>
<li><code>production.somesite.com</code></li>
<li><code>staging.somesite.com</code></li>
</ul>

<p>When exposing <strong>1</strong> url, things (at least in the cloud landscape) seem to be easy.</p>

<p>You make the service <code>LoadBalancer</code> type --> <code>aws</code> provisions an ELB --> you assign an <code>A</code> type alias record (e.g. <code>whatever.somesite.com</code>) to ELB's <code>dns</code> name and boom, there is your service publicly available via the hostname you like.</p>

<p>I assume one easy (and I guess not best-pracise-wise) way of going about this is to expose <strong>2</strong> ELBs.</p>

<p>Is <code>Ingress</code> the (good) alternative?</p>

<p>If so, what is the <code>Route53</code> record I should create?</p>

<p>For what that matters (and in case this may be a dealbreaker for <code>Ingress</code>): </p>

<ul>
<li><code>production.somesite.com</code> will be <strong>publicly</strong> available</li>
<li><code>staging.somesite.com</code> will have restrictive acces</li>
</ul>

<p>Ingress is for sure one possible solution.</p>

<p>You need to deploy in your cluster an <code>Ingress controller</code> (for instance <a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx</a>) than expose it with a <code>Service</code> of type <code>LoadBalancer</code> as you did previously.</p>

<p>In <code>route53</code>, you need to point any domain names you want to be served by your ingress controller to ELB's name, exactly as you did previously.</p>

<p>The last thing you need to do is create an <code>Ingress</code> resource for every domain you want your ingress controller to be aware of (more on this here: <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/</a>).</p>

<p>That being said, if you plan to only have 2 public URLs in your cluster I'd use 2 ELBs. Ingress controller is another component to be maintained/monitored in your cluster, so take this into account when evaluating the tradeoffs.</p>
