Expose service with public IP

48 views
Skip to first unread message

Javi Legido

unread,
May 11, 2021, 9:32:20 AM5/11/21
to metallb-users
Hi there.

I have a cluster with 3 Virtual Machines, each one of them with a public IP address.

I enabled nginx ingress controller, so my next challenge is how to expose a hello world service to outside world.

I assume that I'm on "bare-metal" [1] scenario, and I was wondering if I would be able to use MetalLB as my external load balancer (by software) solution.

From my understanding layer 2 configuration will not be able to expose to the DMZ a service, I'm right?

Thanks.

Javier

Johannes Liebermann

unread,
May 14, 2021, 4:45:23 AM5/14/21
to Javi Legido, metallb-users
Hi Javier,

>I assume that I'm on "bare-metal" [1] scenario, and I was wondering if I would be able to use MetalLB as my external load balancer (by software) solution.

I suggest you try. You can find the documentation here: https://metallb.org/

>From my understanding layer 2 configuration will not be able to expose to the DMZ a service, I'm right?

MetalLB can expose k8s services to the outside world via BGP or ARP. If you're using ARP (layer 2 mode), the IP used to expose a service appears to the outside world as if it is configured on one of your k8s nodes. Hope that helps you answer the question regarding the DMZ, but again - I suggest you simply try it.

Good luck,
Johannes

--
You received this message because you are subscribed to the Google Groups "metallb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metallb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metallb-users/f1258953-6676-4cab-b2fc-f58af10fa25an%40googlegroups.com.


--
Johannes Liebermann

Kinvolk GmbH | Adalbertstr. 6a, 10999 Berlin | tel: +491755589364
Geschäftsführer/Director: Benjamin Owen Orndorff
Registergericht/Court of registration: Amtsgericht Charlottenburg
Registernummer/Registration number: HRB 171414 B
Ust-ID-Nummer/VAT ID number: DE302207000

Johannes Liebermann

unread,
May 14, 2021, 5:34:36 AM5/14/21
to Javi Legido, metallb-users
Sure, you can expose any IP using ARP. As long as your network topology ensures that the address you advertise is routed to the layer 2 segment where your k8s nodes are, it should work.

On Fri, May 14, 2021 at 12:03 PM Javi Legido <ja...@legido.com> wrote:
Hi there.

Many thanks for your reply. Let me refine it a little bit: I can expose a public IP address with ARP?

Thanks.

Javier

Florian Rommel

unread,
May 14, 2021, 7:58:07 AM5/14/21
to Johannes Liebermann, Javi Legido, metallb-users

Works fine, been using it in production for 3 months..

:) even reconfiguring the ip range works.. (expanding it)

Loving the product.. failover could be done a bit faster maybe somehow but otherwise yep

Reply all
Reply to author
Forward
0 new messages