Port number in the final external url

Hi all,

I am new to kubernetes, i have to do the ui deployment on kuberntes which was previously running on url xyz.site.com:5000/ on a virtual machine, this url is used by a lot of users and dont want to make users change url on their end.

How can we do this kind of deployment, i have the deployment with 3 pods, service which is cluster ip and ingress as load balancer, but ingress takes fully qualified domain name as host which does not include port number in the url, i checked about nodePort service which has range of ports from 30000 to 32766.

How can i proceed with this, what can i add to make sure that users doesn,t change their url(xyz.site.com:5000/) on their end.

Any advice on this would be helpfull, thanks.

Ingress resources don’t expose arbitrary ports, there’s mention of this in the ingress resource documentation and it also tells you that this is what service resources via node port and load balancer are for.

Hey thanks for responding, yeah nodeport and loadbalancer are used to expose the port but the port range for those two service are in between 30000 to 32766, what if we want a port less than 30000 to be exposed, what are the options for that.

If you want to change the available port range for nodeport. See this section as it explains what flag to change.

Likely a more-preferable solution is to just expose a LoadBalancer Type Service. You can control what port to expose.

If you’re trying to just get around having to allocate a cloud loadbalancer and expose services across all nodes, there’s also klipper loadbalancer from k3s. It’s getting into the territory of rolling your own cluster solutions though.

Likely a more-preferable solution is to just expose a LoadBalancer Type Service . You can control what port to expose. — here i tried using loadbalancer and nodePort option, its giving same error saying port range should be in between 30000 to 32767, how can i use a port less than that, in the documentation its not mentioned anywhere

What is your LoadBalancer provider? Any sort of restrictions on LoadBalancer port range will be specific to which provider you’re using.

What Ingress controller?