As far as I'm aware, many Kubernetes clusters are using CNI for networking, which doesn't have a working hostPort implementation. This means you have to use hostNetwork to run a working ingress controller.
Since 0.9, nginx has support for ingress classes, meaning you should be able to run multiple ingress controllers with different ingress classes, except you can't because ports are hardcoded in multiple places.
Can these be made configurable?
@jakexks yes, we can make this ports configurable using additional flag but keep in mind that we need to change other ports:
which means 5 new flags (I think this makes no sense)
toughts/ideas/alternatives?
We have a different Use Case but basically the same requirement. So I thought I just let you know.
We are trying to run nginx-ingress-controller as non-root, so for us it would also be really nice to change the ports to something above 1024.
@aledbf I would be happy with flags that had defaults if they were unset for backwards compatibility?
Is there anything wrong with adding 5 flags? Flags with defaults seem much more sane than "const" declarations in the source to me.
Not sure I understand what's wrong with having many flags... as @jakexks says, Flags with defaults seem much more sane than "const" declarations in the source to me.
Not sure I understand what's wrong with having many flags
Not problem at all, just too many flags :)
I will include this change in the next release
Would it also be possible to allow listening to multiple ports (e.g. 443 and 3000) and then forward incoming requests to https://mydoman.com to service1 and https://mydomain.com:3000 to service2?
Closing. HostPort is an option since k8s v1.7.0-alpha.4
I am in a similar situation as @Globegitter. What can be workarounds towards achieving this. (The scenario is that we don't have control over external DNS so the only option is using multiple external ports in the same nginx controller, which is currently not possible).
Most helpful comment
Would it also be possible to allow listening to multiple ports (e.g. 443 and 3000) and then forward incoming requests to https://mydoman.com to service1 and https://mydomain.com:3000 to service2?