Can I set custom ports for a Kubernetes ingress to listen on besides 80 / 443?

Chris Stryczynski picture Chris Stryczynski · May 21, 2019 · Viewed 16.4k times · Source

I don't mean being able to route to a specific port, I mean to actually change the port the ingress listens on.

Is this possible? How? Where is this documented?

Answer

dlaidlaw picture dlaidlaw · May 21, 2019

From the kubernetes documentation:

An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type Service.Type=NodePort or Service.Type=LoadBalancer.

It may be possible to customize a LoadBalancer on a cloud provider like AWS to listen on other ports.