Juju expose on k8s doesn't seem to support non-web services

Bug #1889703 reported by Barry Price
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

I can write a charm to deploy a network service running on an arbitrary TCP/UDP port, the pods deploy correctly and the service works fine on the individual units.

But Juju doesn't seem to be able to set up a Service for us in this use case.

Even with our service ports defined correctly in the pod spec as e.g. TCP/123 or UDP/456, running 'juju expose' seems to ignore them and instead creates an Ingress for TCP/80.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.8.3
importance: Undecided → High
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

We dug into this a bit on our end, and the track led us down:
https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules

Really only defines ways of exposing HTTP workloads. There doesn't seem to be anything in Ingress rules that would expose alternative ports/sockets like UDP for Bind.

That said, Nginx is one of the most common ingress controllers, and it is happy to support configuration that exposes raw TCP or UDP:
https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/

Do we know if there are plans inside K8s to update the Ingress definitions to expose services other-than-http?
In the meantime, could we have our Nginx ingress controller charm have a 'expose' sort of relation, that you could then relate your Bind charm to Nginx and have it ask for Nginx to get the extra configuration?

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1889703] Re: k8s ingress doesn't seem to support non-web services

We should also look into not utilizing an Ingress controller, but just a
Service description for Bind:
https://kubernetes.io/docs/concepts/services-networking/service/

On Wed, Aug 5, 2020 at 1:05 PM John A Meinel <email address hidden>
wrote:

> We dug into this a bit on our end, and the track led us down:
>
> https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
>
> Really only defines ways of exposing HTTP workloads. There doesn't seem
> to be anything in Ingress rules that would expose alternative
> ports/sockets like UDP for Bind.
>
> That said, Nginx is one of the most common ingress controllers, and it is
> happy to support configuration that exposes raw TCP or UDP:
>
> https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/
>
> Do we know if there are plans inside K8s to update the Ingress definitions
> to expose services other-than-http?
> In the meantime, could we have our Nginx ingress controller charm have a
> 'expose' sort of relation, that you could then relate your Bind charm to
> Nginx and have it ask for Nginx to get the extra configuration?
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1889703
>
> Title:
> k8s ingress doesn't seem to support non-web services
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1889703/+subscriptions
>

Barry Price (barryprice)
summary: - k8s ingress doesn't seem to support non-web services
+ Juju expose on k8s doesn't seem to support non-web services
description: updated
John A Meinel (jameinel)
Changed in juju:
milestone: 2.8.3 → none
Barry Price (barryprice)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.