Ingress resource having backend kubernetes services in multiple namespace.

1,655 views
Skip to first unread message

cybage.a...@gmail.com

unread,
Oct 12, 2017, 3:21:15 AM10/12/17
to Kubernetes user discussion and Q&A
Hi,

I have two applications deployed in different namespace in Google Kontainer engine(GKE). I want to use a single ingress resource (Google Load Balancer) to point to both the application using path based routing. Is it possible to have backend kubernetes services in multiple namespace behind a single ingress resource. If possible, how?

Tim Hockin

unread,
Oct 12, 2017, 12:08:29 PM10/12/17
to Kubernetes user discussion and Q&A
Currently it is not possible to express this.

On Thu, Oct 12, 2017 at 12:21 AM, <cybage.a...@gmail.com> wrote:
> Hi,
>
> I have two applications deployed in different namespace in Google Kontainer engine(GKE). I want to use a single ingress resource (Google Load Balancer) to point to both the application using path based routing. Is it possible to have backend kubernetes services in multiple namespace behind a single ingress resource. If possible, how?
>
> --
> You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
> To post to this group, send email to kubernet...@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.

Cybage ALM

unread,
Oct 17, 2017, 6:56:15 AM10/17/17
to kubernet...@googlegroups.com
Hi Tim,
Thanks for the response.
We are now left the solution of creating two separate ingress resources for two namespaces.
So do you suggest some different solution or we must continue with the same?

Thanks.

On Thu, Oct 12, 2017 at 9:38 PM, 'Tim Hockin' via Kubernetes user discussion and Q&A <kubernet...@googlegroups.com> wrote:
Currently it is not possible to express this.

On Thu, Oct 12, 2017 at 12:21 AM,  <cybage.a...@gmail.com> wrote:
> Hi,
>
> I have two applications deployed in different namespace in Google Kontainer engine(GKE). I want to use a single ingress resource (Google Load Balancer) to point to both the application using path based routing. Is it possible to have backend kubernetes services in multiple namespace behind a single ingress resource. If possible, how?
>
> --
> You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/FJxSIJHxagc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.

Tim Hockin

unread,
Oct 17, 2017, 11:46:41 AM10/17/17
to Kubernetes user discussion and Q&A
The way the GCP Ingress controller is implemented is one IP per
Ingress, and Ingress is always single-namespace (for now). You could
do something like have a Service in your namespace that redirects to a
service in a different namespace, maybe, but I have never tried that.

On Tue, Oct 17, 2017 at 3:56 AM, Cybage ALM <cybage.a...@gmail.com> wrote:
> Hi Tim,
> Thanks for the response.
> We are now left the solution of creating two separate ingress resources for
> two namespaces.
> So do you suggest some different solution or we must continue with the same?
>
> Thanks.
>
> On Thu, Oct 12, 2017 at 9:38 PM, 'Tim Hockin' via Kubernetes user discussion
> and Q&A <kubernet...@googlegroups.com> wrote:
>>
>> Currently it is not possible to express this.
>>
>> On Thu, Oct 12, 2017 at 12:21 AM, <cybage.a...@gmail.com> wrote:
>> > Hi,
>> >
>> > I have two applications deployed in different namespace in Google
>> > Kontainer engine(GKE). I want to use a single ingress resource (Google Load
>> > Balancer) to point to both the application using path based routing. Is it
>> > possible to have backend kubernetes services in multiple namespace behind a
>> > single ingress resource. If possible, how?
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Kubernetes user discussion and Q&A" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an email to kubernetes-use...@googlegroups.com.
>> > To post to this group, send email to kubernet...@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/kubernetes-users.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Kubernetes user discussion and Q&A" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/kubernetes-users/FJxSIJHxagc/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> kubernetes-use...@googlegroups.com.
>> To post to this group, send email to kubernet...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/kubernetes-users.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-use...@googlegroups.com.
> To post to this group, send email to kubernet...@googlegroups.com.

Itamar O

unread,
Oct 17, 2017, 12:47:40 PM10/17/17
to Kubernetes user discussion and Q&A
FWIW, we're running an nginx ingress controller on GKE (kube-system namespace), and use annotations to target some ingress objects to that controller (from multiple namespaces), exposing just the ingress controller service.
In our use-case, we expose the ingress controller service using LoadBalancer type with an annotation for ILB, so it can be used to access "private services" from the office network (over VPN), but I don't see any reason that it wouldn't work just the same to expose it using public LB or with a GLBC-targeted ingress object.
Reply all
Reply to author
Forward
0 new messages