Posts

MetalLB on Loopback

Image
Want to give MetalLB a try with your Minikube but don't have control over your L2 network? Don't have enough free IP addresses? You can actually create a loopback adapter on your local host with a non-routable subnet and use that to allocate your L2 IP addresses. As in my previous post , I'm setting up Minikube using the none  driver so MetalLB has direct access to the host system's networking. First, you'll want to create a new loopback adapter on the subnet of your choice. This is my work machine and the 192.168.1.0/24 network is unused so I'll use that: ifconfig lo:0 192.168.1.1 netmask 255.255.255.0 up I now have a new lo:0 adapter on my system that's running on 192.168.1.1/24 . I can now use that subnet in my metallb ConfigMap: root@jason-c30:~# cat metallb-config.yaml  apiVersion: v1 kind: ConfigMap metadata:   namespace: metallb-system   name: config data:   config: |     address-pools:     - name: my-...

Minikube + MetalLB

I wanted to test out MetalLB 's capabilities and thought that running it on a local Minikube cluster would be a good way to check it out. Turns out it was so easy, I thought I must have done something wrong, but it worked on the first try! Since I don't have any BGP capabilities in my home lab, I went with the L2 configuration, but since it's a single node anyway that should not matter. First, I installed Minikube using the "none" driver so it runs directly inside the local Docker. This will ensure that the MetalLB containers can modify the bare metal system's IP tables instead of the IP tables running inside of a VM. # minikube start --vm-driver=none --kubernetes-version=v1.11.0 Next, install MetalLB # kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.7.3/manifests/metallb.yaml After MetalLB is installed, you need to upload a ConfigMap to tell MetalLB about your configuration and what floating IP addresses to use. ht...