17e4fb12786738b17490a179f757de8136d19a31
[it/test.git] / XTesting / kubespray / docs / kube-vip.md
1 # kube-vip
2
3 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.
4
5 ## Install
6
7 You have to explicitly enable the kube-vip extension:
8
9 ```yaml
10 kube_vip_enabled: true
11 ```
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
16 ```yaml
17 # HA for control-plane, requires a VIP
18 kube_vip_controlplane_enabled: true
19 kube_vip_address: 10.42.42.42
20 loadbalancer_apiserver:
21   address: "{{ kube_vip_address }}"
22   port: 6443
23 # kube_vip_interface: ens160
24
25 # LoadBalancer for services
26 kube_vip_services_enabled: false
27 # kube_vip_services_interface: ens320
28 ```
29
30 > Note: When using `kube-vip` as LoadBalancer for services,
31 [additional manual steps](https://kube-vip.io/docs/usage/cloud-provider/)
32 are needed.
33
34 If using [ARP mode](https://kube-vip.io/docs/installation/static/#arp) :
35
36 ```yaml
37 kube_vip_arp_enabled: true
38 ```
39
40 If using [BGP mode](https://kube-vip.io/docs/installation/static/#bgp) :
41
42 ```yaml
43 kube_vip_bgp_enabled: true
44 kube_vip_local_as: 65000
45 kube_vip_bgp_routerid: 192.168.0.2
46 kube_vip_bgppeers:
47 - 192.168.0.10:65000::false
48 - 192.168.0.11:65000::false
49 # kube_vip_bgp_peeraddress:
50 # kube_vip_bgp_peerpass:
51 # kube_vip_bgp_peeras:
52 ```