Closed theangrydev closed 5 years ago
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 notifications@github.com 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 https://github.com/openshift/origin/issues/16529#issuecomment-331975124, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0iSo03RPjXu-_7LNn4sXYCvE3MJkGXks5sl_RlgaJpZM4PiPyF.
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.
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 notifications@github.com 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 /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/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 /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@orange00: You can't reopen an issue/PR unless you authored it or you are a collaborator.
Also, it is possible to create individual routers in 'default' namespace for each exposed port. That should work too.
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. Router sharding means that routers will use selectors to serve only some routes.
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 --add env. variable to router: ROUTE_LABELS="router=8080" => serves as a route selector --ie., router will only serve routes that have a label: router=8080 --add label to route: router=8080
/remove-lifecycle rotten
/reopen
@orange00: You can't reopen an issue/PR unless you authored it or you are a collaborator.
/reopen
@theangrydev: Reopened this issue.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
/reopen this is still not possible with routes but there are workarounds as discussed above
/reopen
@theangrydev: Reopened this issue.
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
@AstroViking: You can't reopen an issue/PR unless you authored it or you are a collaborator.
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.
bump
@tocosonic: You can't reopen an issue/PR unless you authored it or you are a collaborator.
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.