<p>I have several AWS EC2 instances, and on them I have a Rancher instance deployed. On Rancher, I've deployed a website using Kubernetes, and it is deployed using Istio to handle the networking, I am able to log in with <code>http://portal.website.com:31380</code>. I also have AWS Route 53 to get the URL working and nginx for a load balancer across the EC2 instances.</p>

<p>But I want to be able to login with just <code>http://portal.website.com</code>, so removing the port. Is there a way for me to do this?</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
 name: portal-gateway
spec:
 selector:
   istio: ingressgateway
 servers:
 - port:
     number: 80
     name: http
     protocol: HTTP
   hosts:
   - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
 name: ingress
spec:
 hosts:
 - "*"
 gateways:
 - portal-gateway
 http:
 - match:
   - uri:
       prefix: "/"
   rewrite:
     uri: "/"
   route:
   - destination:
       host: portal
       port:
         number: 80
   websocketUpgrade: true
---
apiVersion: v1
kind: Service
metadata:
 name: portal
spec:
 ports:
   - protocol: TCP
     port: 80
     targetPort: 8080
 selector:
   app: portal
 type: ClusterIP
</code></pre>

<p>Edit: I am accessing this on 31380, because it is setup to use a NodePort (<a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#nodeport</a>). The Istio docs say <code>If the EXTERNAL-IP value is &lt;none&gt; (or perpetually &lt;pending&gt;), your environment does not provide an external load balancer for the ingress gateway. In this case, you can access the gateway using the service’s node port.</code></p>

<p>Here is the output of <code>kubectl get svc istio-ingressgateway -n istio-system</code></p>

<p>NAME                   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                                                                                                      AGE
istio-ingressgateway   NodePort   10.43.200.101           15020:30051/TCP,80:31380/TCP,443:31390/TCP,31400:31400/TCP,15029:30419/TCP,15030:30306/TCP,15031:31130/TCP,15032:32720/TCP,15443:30361/TCP   3h27m</p>

Mike K.
<p>As you mentioned, istio <a href="https://istio.io/latest/docs/tasks/traffic-management/ingress/ingress-control/#determining-the-ingress-ip-and-ports" rel="nofollow noreferrer">documentation</a> say that</p>
<blockquote>
<p>If the EXTERNAL-IP value is  (or perpetually ), your environment does not provide an external load balancer for the ingress gateway. In this case, you can access the gateway using the service’s node port.</p>
</blockquote>
<hr />
<p>If we take a look at kubernetes <a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer">documentation</a> about NodePort</p>
<blockquote>
<p>If you set the type field to NodePort, the Kubernetes control plane allocates a port from a range specified by --service-node-port-range flag (default: 30000-32767). Each node proxies that port (the same port number on every Node) into your Service. Your Service reports the allocated port in its .spec.ports[*].nodePort field.</p>
</blockquote>
<p>So if you ingress-gateway is NodePort then you have to use <a href="http://portal.website.com:31380" rel="nofollow noreferrer">http://portal.website.com:31380</a>.</p>
<p>If you want to use <a href="http://portal.website.com" rel="nofollow noreferrer">http://portal.website.com</a> to would have to change it to <a href="https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer" rel="nofollow noreferrer">LoadBalancer</a>.</p>
<p>As @sachin mentioned, If you use cloud like aws you can configure Istio with AWS Load Balancer with appropriate annotations.</p>
<blockquote>
<p>On cloud providers which support external load balancers, setting the type field to LoadBalancer provisions a load balancer for your Service. The actual creation of the load balancer happens asynchronously, and information about the provisioned balancer is published in the Service's .status.loadBalancer</p>
</blockquote>
<p>I see you use aws, so you can read more about it in below links:</p>
<ul>
<li><a href="https://docs.aws.amazon.com/eks/latest/userguide/load-balancing.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/load-balancing.html</a></li>
<li><a href="https://istio.io/latest/blog/2018/aws-nlb/" rel="nofollow noreferrer">https://istio.io/latest/blog/2018/aws-nlb/</a></li>
</ul>
<hr />
<p>If it´s on premise then you could take a look at <a href="https://metallb.universe.tf/" rel="nofollow noreferrer">metalLB</a></p>
<blockquote>
<p>MetalLB is a load-balancer implementation for bare metal Kubernetes clusters, using standard routing protocols.</p>
</blockquote>
<blockquote>
<p>Kubernetes does not offer an implementation of network load-balancers (Services of type LoadBalancer) for bare metal clusters. The implementations of Network LB that Kubernetes does ship with are all glue code that calls out to various IaaS platforms (GCP, AWS, Azure…). If you’re not running on a supported IaaS platform (GCP, AWS, Azure…), LoadBalancers will remain in the “pending” state indefinitely when created.</p>
</blockquote>
<blockquote>
<p>Bare metal cluster operators are left with two lesser tools to bring user traffic into their clusters, “NodePort” and “externalIPs” services. Both of these options have significant downsides for production use, which makes bare metal clusters second class citizens in the Kubernetes ecosystem.</p>
</blockquote>
<blockquote>
<p>MetalLB aims to redress this imbalance by offering a Network LB implementation that integrates with standard network equipment, so that external services on bare metal clusters also “just work” as much as possible.</p>
</blockquote>
<p>You can read more about it in below link:</p>
<ul>
<li><a href="https://medium.com/@emirmujic/istio-and-metallb-on-minikube-242281b1134b" rel="nofollow noreferrer">https://medium.com/@emirmujic/istio-and-metallb-on-minikube-242281b1134b</a></li>
</ul>
