You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.9 KiB

  1. # kube-vip
  2. kube-vip provides Kubernetes clusters with a virtual IP and load balancer for both the control plane (for building a highly-available cluster) and Kubernetes Services of type LoadBalancer without relying on any external hardware or software.
  3. ## Prerequisites
  4. You have to configure `kube_proxy_strict_arp` when the kube_proxy_mode is `ipvs` and kube-vip ARP is enabled.
  5. ```yaml
  6. kube_proxy_strict_arp: true
  7. ```
  8. ## Install
  9. You have to explicitly enable the kube-vip extension:
  10. ```yaml
  11. kube_vip_enabled: true
  12. ```
  13. You also need to enable
  14. [kube-vip as HA, Load Balancer, or both](https://kube-vip.io/docs/installation/static/#kube-vip-as-ha-load-balancer-or-both):
  15. ```yaml
  16. # HA for control-plane, requires a VIP
  17. kube_vip_controlplane_enabled: true
  18. kube_vip_address: 10.42.42.42
  19. loadbalancer_apiserver:
  20. address: "{{ kube_vip_address }}"
  21. port: 6443
  22. # kube_vip_interface: ens160
  23. # LoadBalancer for services
  24. kube_vip_services_enabled: false
  25. # kube_vip_services_interface: ens320
  26. ```
  27. > Note: When using `kube-vip` as LoadBalancer for services,
  28. [additional manual steps](https://kube-vip.io/docs/usage/cloud-provider/)
  29. are needed.
  30. If using [local traffic policy](https://kube-vip.io/docs/usage/kubernetes-services/#external-traffic-policy-kube-vip-v050):
  31. ```yaml
  32. kube_vip_enableServicesElection: true
  33. ```
  34. If using [ARP mode](https://kube-vip.io/docs/installation/static/#arp) :
  35. ```yaml
  36. kube_vip_arp_enabled: true
  37. ```
  38. If using [BGP mode](https://kube-vip.io/docs/installation/static/#bgp) :
  39. ```yaml
  40. kube_vip_bgp_enabled: true
  41. kube_vip_local_as: 65000
  42. kube_vip_bgp_routerid: 192.168.0.2
  43. kube_vip_bgppeers:
  44. - 192.168.0.10:65000::false
  45. - 192.168.0.11:65000::false
  46. # kube_vip_bgp_peeraddress:
  47. # kube_vip_bgp_peerpass:
  48. # kube_vip_bgp_peeras:
  49. ```
  50. If using [control plane load-balancing](https://kube-vip.io/docs/about/architecture/#control-plane-load-balancing):
  51. ```yaml
  52. kube_vip_lb_enable: true
  53. ```