This Helm chart should ideally work on any Kubernetes cluster. For local development and iterative testing, we recommend using MicroK8s. This setup enables a rapid development workflow without the need to manage complex infrastructure.
[ -d $HOME/.kube ] && mv $HOME/.kube $HOME/.kube.oldmicrok8s install --cpu 8 --mem 24 --disk 200 --channel latest/stablemkdir $HOME/.kube && microk8s config -o yaml > $HOME/.kube/config
chmod 600 $HOME/.kube/configEnable DNS and local storage addons
microk8s enable dns
microk8s enable hostpath-storageYou will need a valid IP address range on your network that MetalLB can use for LoadBalancer services.
Depending on your OS, you might be running MicroK8s directly on Linux or inside a virtual machine on macOS. Below are example commands for each setup:
Get CIDR on Linux using the eth0 interface
CIDR=$(ip -4 -o addr show scope global | grep 'eth0' | awk '{print $4}' | sed 's|[0-9]\+/|0/|')Get CIDR on macOS using the MicroK8s VM address
CIDR=$(multipass info microk8s-vm --format json | jq -r '.info["microk8s-vm"].ipv4[0] + "/32"')You can verify that the CIDR was captured correctly with:
echo $CIDROnce you have your CIDR, you can enable metallb
microk8s enable metallb:$CIDRImportant
If you are running MicroK8s on macOS, you will need to increase the memory map areas per VM process
# only if running microk8s on macOS
multipass exec microk8s-vm -- sudo sysctl -w vm.max_map_count=262144