Kubernetes Cluster LoadBalancer for Bare Metal/VM Installations¶
For our example we are going to enable a Kubernetes based LoadBalancer to issue IP addresses to our Kubernetes Services of type LoadBalancer
using kube-vip
.
Ingress Service is pending
The ingress-nginx-controller
is currently in the pending
state as there is no CCM/LoadBalancer
kube-vip
¶
We will install two components into our Kubernetes CLuster
kube-vip-cloud-controller¶
Quote
The kube-vip cloud provider can be used to populate an IP address for Services of type LoadBalancer similar to what public cloud providers allow through a Kubernetes CCM.
kubectl apply -f https://raw.githubusercontent.com/kube-vip/kube-vip-cloud-provider/main/manifest/kube-vip-cloud-controller.yaml
Now we need to setup the required RBAC permissions: -
The following ConfigMap will configure the kube-vip-cloud-controller
to obtain IP addresses from the host networks DHCP server. i.e. the DHCP on the physical network that the host machine or VM is connected to.
apiVersion: v1
kind: ConfigMap
metadata:
name: kubevip
namespace: kube-system
data:
cidr-global: 0.0.0.0/32
It is possible to specify IP address ranges see here.
Kubernetes Load-Balancer Service¶
In this example the network interface of the master node is 192.168.2.180
and the interface is enp0s1
.
We need to apply the kube-vip
daemonset but first we need to create the configuration
Lines 5, 7, 12, 16, 38 and 62 need modifying to your environment.
ARP or BGP
The Daemonset above uses ARP to communicate with the network it is also possible to use BGP. See Here
Our ingress-nginx-controller
has been allocated the IP Address 192.168.2.194
.
Ingress Access
The ingress-niginx-controller
requires the host FQDN to be on the user requests in order to know how to route the requests to the correct Kubernetes Service. Using the iP address in the URL will cause an error as ingress cannot select the correct service.
If you did not set the FQDN of the Kinetica Cluster to a DNS resolvable hostname add local.kinetica
to your /etc/hosts/
file in order to be able to access the Kinetica URLs
Accessing the Workbench
You should be able to access the workbench at http://local.kinetica