Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nginx] Listening ports are not configurable, so ingress can't be run multiple times per node when using CNI #620

Closed
jakexks opened this issue Apr 18, 2017 · 8 comments · Fixed by #1239

Comments

@jakexks
Copy link

jakexks commented Apr 18, 2017

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?

@aledbf
Copy link
Member

aledbf commented Apr 19, 2017

@jakexks yes, we can make this ports configurable using additional flag but keep in mind that we need to change other ports:

  • 80 http
  • 443 https
  • 442 real https port (443 is used for ssl passthrough)
  • 18080 default server
  • 8181 default server

which means 5 new flags (I think this makes no sense)
toughts/ideas/alternatives?

@ghost
Copy link

ghost commented Apr 27, 2017

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.

@jakexks
Copy link
Author

jakexks commented Apr 27, 2017

@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.

@ipedrazas
Copy link

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.

@aledbf
Copy link
Member

aledbf commented Apr 27, 2017

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

@Globegitter
Copy link
Contributor

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?

@aledbf aledbf moved this from TODO to In Progress in nginx 0.9-beta.9 Jun 23, 2017
@aledbf
Copy link
Member

aledbf commented Jun 25, 2017

Closing. HostPort is an option since k8s v1.7.0-alpha.4

@aledbf aledbf closed this as completed Jun 25, 2017
@aledbf aledbf moved this from In Progress to done in nginx 0.9-beta.9 Jun 25, 2017
@prat0318
Copy link

prat0318 commented Aug 6, 2017

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5 participants