-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Is it possible for a route to expose multiple ports? #16529
Comments
You can but you have to setup Ingress controller. Look at the doc for this. It not a fun task. |
@gamkiller77 Can you link me to the relevant section in the documentation, please? Do you know if anyone has written a blog post about this or anything like that? |
@gamkiller77 Also, is this on the OpenShift roadmap as something to support without manually setting up Ingress? I may be interested in contributing this if I am able to. |
This is what I used to track down the true problem.
https://docs.openshift.org/3.6/admin_guide/sdn_troubleshooting.html <https://docs.openshift.org/3.6/admin_guide/sdn_troubleshooting.html>
Andy
… On Sep 25, 2017, at 11:43 AM, Liam Williams ***@***.***> wrote:
@gamkiller77 <https://github.com/gamkiller77> Can you link me to the relevant section in the documentation, please? Do you know if anyone has written a blog post about this or anything like that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#16529 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AD0iSo03RPjXu-_7LNn4sXYCvE3MJkGXks5sl_RlgaJpZM4PiPyF>.
|
I'm facing the same issue here. |
Yah see this is the key problem with this setup. Great use case but there no simple solution.
Andy del Hierro
From the power of an iPhone 7 Plus
… On Nov 7, 2017, at 9:01 PM, Cai Lei ***@***.***> wrote:
I'm facing the same issue here.
I deployed a gogs (git server) in my Openshift cluster, the pod exposes 2 ports where 3000 for HTTP and 22 for SSH access, but the route object can only expose 1 of the 2 ports to external world.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok I just talked to a team mate. You can do this with ingress. Setup the service to expose what you need 80/443 and 22. You then switch this service to ingress load balancer so you get an IP with multiple Ports on one IP. |
@gamkiller77 Could you help me out by indicating how ingress load balancer can be set up ? |
@Karthikeyashastry not sure how to private message in GIT but hit me up and i try and help. |
@gamkiller77 : Can you point me to some link or document where I can configure ingress in openshift to expose routes backed by service running in different ports |
@ravishankarhassain : Instead of ingress, simplest thing to do would be to delete your existing service, and create individual service for each of the exposed port, and create routes for these new services |
yeah sounds good I will try it |
by doing so, it is still not possible to use the same host name for different ports. When using one service with multiple ports you can also create routes for each of those ports, but you have to use different host names :-( |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
@tocosonic exactly! My app does http and websocket requests. So, I need to map to two ports. I can do it with 2 routes, but in this case since host names are different, I cannot use same session cookie |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@orange00: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Also, it is possible to create individual routers in 'default' namespace for each exposed port. Eg., to have a router for port 8080 (instead of 80), edit the router YAML and replace all occurences of '80' with '8080' To have multiple routers for different ports, copy router YAML, change every occurence of port and router name, and import the YAML as a new router. @tocosonic This way you can use the same host for different routes (because, different ports will be served by different routers) If you have multiple routers (each for different ports), each of your routes will be accessible on every port. If you want to limit which routes will be accessible on which ports, you can use router sharding. That way, for eg., router for port 8080 can serve only backend routes and router for port 80 can serve only frontend routes. ROUTER SHARDING |
/remove-lifecycle rotten |
/reopen |
@orange00: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@theangrydev: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen this is still not possible with routes but there are workarounds as discussed above |
/reopen |
@theangrydev: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@AstroViking: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is this still an issue or is there a way to open multiple ports on the same route, and can someone link to documentation for that? |
/reopen |
@rishabh625: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
bump |
@tocosonic: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I have a service with many ports that I would like to expose. Kubernetes services support multiple ports. OpenShift routes seem to not support multiple ports.
Version
Any.
Steps To Reproduce
Expose a route to a service with multiple ports.
Current Result
Only one port is exposed.
Expected Result
All the ports are exposed.
The text was updated successfully, but these errors were encountered: