apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
name: dgiebert-fleet-kubevip
namespace: fleet-default
spec:
branch: main
repo: https://github.com/dgiebert/fleet-kubevip.git
- Disable the servicelb for k3s
- Uses the default network interface (autodetected)
- Tested with Harvester VMs only (but should work on all nodes)
In order to do this, we need to signify to kube-vip and the cloud provider that we don't need one of their managed addresses. We do this by explicitly exposing a Service on the address 0.0.0.0. When kube-vip sees a Service on this address, it will create a macvlan interface on the host and request a DHCP address. Once this address is provided, it will assign it as the LoadBalancer IP and update the Kubernetes Service.
-- Kubevip Docs
- Set the
global-cidr
in thekubevip
configmap to be0.0.0.0/32
this will assign all LBs the IP0.0.0.0
done by the kube-vip-cloud-provider - The
kube-vip
pod will look for services that are configured this and request a DHCP address