2 ms·
I use MetalLB to allocate RFC1918 IPs out of a dedicated pool to LoadBalancer services. MetalLB then publishes these to my router over BGP because, you know, wh
by growse 7y ago
I use MetalLB to allocate RFC1918 IPs out of a dedicated pool to LoadBalancer services. MetalLB then publishes these to my router over BGP because, you know, why not?
I then have external-dns running (https://github.com/kubernetes-sigs/external-dns https://github.com/kubernetes-sigs/external-dns) which manages the relevant A/CNAME records on Google DNS (other DNS providers are supported) so that I can resolve "myservice.mydomain.com" to the service's IP address.
I wrote a bit about the BGP bit last year: https://www.growse.com/2019/04/13/at-home-with-kubernetes-metallb-and-bgp.html https://www.growse.com/2019/04/13/at-home-with-kubernetes-me...
Admittedly, I have no desire to expose any of these service to the internet, but if I did I could use an IPv6 address on the service instead, or add a static NAT rule to the router to forward traffic to the service IPv4 address. Auto provisioning of NAT rules feels icky, so I'd probably go down the ipv6 route if I wanted to do this.