In BGP mode without leader election, every kube-vip instance announces
the same VIP. ECMP distributes traffic evenly, but if a node's
kube-apiserver goes down, kube-vip (a static pod tied to kubelet) keeps
advertising the route — sending a fraction of all API traffic into a
black hole.
An optional health check loop now polls the local kube-apiserver and
withdraws the BGP route after a configurable number of consecutive
failures, removing the dead node from the ECMP set. The route is
re-announced once the API server recovers.
Signed-off-by: Guillermo Gaston <ggastonloren@nvidia.com>
- Adds the CIDR to the VIP, needed for BGP
- Seperates the EIP association to a seperate function making leader Election code clearer
- Fixes to environment variable names
- Clean un-needed `fatalf` errors
- Added additional comments
This branch adds the option for using the Kubernetes leader election algorithim to ensure that one node in the cluster will host the virtual IP and load-balancer. To use leaderElection the use teh `--leaderElection` flag when running `kubeadm init`
This commit changes the `defaul` behaviour of `kube-vip` to use VIP clustering only. The flag `--lbEnable` will default to `false`, which in turn will result in the kubernetes manifest generated by the `kube-vip kubeadm init` having a disabled load-balancer in the manifets.
- Updates to `makefile` for building locally
- Ensures output is printed correctly for any kube-client errors
- `--config` added to the `kubeadm join` command to specify a different configuration.
This PR adds all of the functionality to use the kube-vip `kubeadm init` and `kubeadm join` commands. It also adds in client-go, to find all controlplane nodes.