Hi Srinivas,

Can you show where you were unable to create multiple routes for the same
service? I have been able to use "oc expose" on the same service multiple
times. You need to take care to use the --name attribute to give the new
route a unique ID/name.

For example, given a service "foo":

oc expose foo --hostname=alias1.somedomain.com
oc expose foo --hostname=alias2.otherdomain.com

The 2nd expose will fail because it will try to create another route called
"foo" (an ID of foo, which is not unique since a route already exists with
that name/id).

You would need to do:

oc expose foo --hostname=alias2.otherdomain.com --name=foo2

I hope this helps!


Erik M Jacobs, RHCA
Principal Technical Marketing Manager, OpenShift Enterprise
Red Hat, Inc.
Phone: 646.462.3745
Email: [email protected]
AOL Instant Messenger: ejacobsatredhat
Twitter: @ErikonOpen
Freenode: thoraxe

On Wed, Jan 20, 2016 at 1:19 PM, Srinivas Naga Kotaru (skotaru) <
[email protected]> wrote:

> Brenton
>
> That part I understood however I was not able to create one then one route
> for a service. So is it expected behavior to have more than one service if
> I want to have more than one route/alias for same application?
>
>
> --
> Srinivas Kotaru
>
>
>
>
>
>
>
> On 1/20/16, 6:02 AM, "Brenton Leanhardt" <[email protected]> wrote:
>
> >On Wed, Jan 20, 2016 at 2:29 AM, Srinivas Naga Kotaru (skotaru)
> ><[email protected]> wrote:
> >> Dale
> >>
> >> Thanks for reply. Am aware of this command but am not sure this is what
> am
> >> looking
> >>
> >> We have 2 URL for every application. 1st one is generated by openshift
> >> router and 2nd one client generated. Client generated URL simple a
> pointer
> >> to our DMZ reverse proxy servers. Once initial traffic landed in DMZ and
> >> proper security filtering, proxied back to openshift url.
> >>
> >> For this setup to work, openshift side should have an alias which is
> >> matching 1st URL for routing to work. In case of apache, it was done
> using
> >> vhost server alias mechanism. Since 3.x use HAProxy based router, am
> >> thinking we should have equivalent setup by matching Host header of 1st
> URL.
> >> At this moment HAProxy Router has ACL which are matching 2nd openshift
> Host
> >> Header.  Without ACL entry matching 1st URL, HAProxy won’t be abel to
> proxy
> >> to end points.  You will get 503 error etc unless we do a Host header
> >> conversion from 1st URL to 2nd at RP layer.
> >>
> >> Hope it helps.
> >
> >Hi Srinivas,
> >
> >To achieve the same result as the 'alias' command from 2.x you would
> >need to create a Route that matches the desired name.  Then you would
> >create a CNAME entry for that in your DNS server that points your
> >desired hostname to your router.  Hopefully I'm underestanding you
> >correctly and this is what you'd like to do.
> >
> >--Brenton
> >
> >>
> >> --
> >> Srinivas Kotaru
> >>
> >> From: Dale Bewley <[email protected]>
> >> Date: Tuesday, January 19, 2016 at 7:21 PM
> >> To: skotaru <[email protected]>
> >> Cc: dev <[email protected]>, "
> [email protected]"
> >> <[email protected]>
> >> Subject: Re: routing/vhost alias
> >>
> >> Try `oc expose service app --hostname=alias-FQDN`, and assuming you
> point
> >> alias-FQDN at your default openshift-FQDN, the route should work.
> >>
> >>
> >> ----- On Jan 19, 2016, at 5:47 PM, Srinivas Naga Kotaru (skotaru)
> >> <[email protected]> wrote:
> >>
> >> Hi
> >>
> >> In OSE 2.X we have a alias concept for routes. User or admin can create
> an
> >> alias ( apache vhost definition) for an application and create a DNS
> recored
> >> to point to upstream load balancer. This was so flexible if user FQDN is
> >> different than openshift created http url (  example
> >> http://<app>-<domain>.domain).
> >>
> >> In 3.X we have router instead of apache node proxy. Can user or admin
> create
> >> similar alias entries?
> >>
> >> The reason am asking, client facing virtual are different than openshift
> >> generated URL’s for each app in our environment.  We need a mechanism to
> >> map/proxy client facing url to openshift generated URL. Thus, it
> requires or
> >> have same Host header at backend using VHOST serveralias or HAProxy
> using
> >> some ACL definition etc.
> >>
> >>
> >> --
> >> Srinivas Kotaru
> >>
> >> _______________________________________________
> >> users mailing list
> >> [email protected]
> >> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
> >>
> >>
> >> _______________________________________________
> >> dev mailing list
> >> [email protected]
> >> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> >>
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
_______________________________________________
dev mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

Reply via email to