Microk8s cluster on a homelab (Proxmox) local network with a Fritzbox and Metallb

Homelab/server with Proxmox connected to my Fritzbox 7590 (XS4ALL NL) configured on home network 192.168.178.0/24 

Inside Proxmox I have 3 vms (ubuntu server 20.04 LTS) that I named k8s-{1,2,3}

During setup of the Ubuntu server vms I selected install openSSH and microk8s

In the fritzbox I selected the option to give proxmox host and k8s-1,2,3 always the same IP

After boot of servers:

On k8s-1 I did sudo microk8s add-node and ran the output on k8s-2, then I repeated that for k8s-3.

I enabled addons on k8s-1: sudo microk8s enable dns metallb

It will ask for an IP range, I opted for 192.168.100.0/24

Then in the Fritzbox, I went to network, network settings, more network settings, static routing tables

I added the route 192.168.100.0, 255.255.255.0, 192.168.178.x (ip of k8s-1), active, and I saved it.

Now I could test the Metallb:

wget https://raw.githubusercontent.com/charmed-kubernetes/metallb-operator/master/docs/example-microbot-lb.yaml
kubectl apply -f example-microbot-lb.yaml
kubectl get service microbot-lb

Under external IP you will find an IP from the 192.168.100.x range, it won't respond to ping, but you can retrieve it with curl or in the browser and show a page with a small picture of a robot.

kubectl delete -f example-microbot-lb.yaml will clean up the test deployment.


Comments

Popular posts from this blog

ABN Amro bank statement export to .OFX

Using Flying Saucer and iText in Java to convert XHTML to PDF