:orphan: .. _nginxgateway_install: Install load balancer (metallb) and Gateway API ------------------------------------------------ MetalLB is a load balancer implementation for Kubernetes that allows services to be exposed externally .. only:: internal FRR: Stands for "Free Range Routing," a routing protocol suite used for dynamic routing. Integration: MetalLB can use FRR to manage BGP (Border Gateway Protocol) for routing traffic to services. Purpose: The combination enables Kubernetes clusters to efficiently handle external traffic. Open Source: Both MetalLB and FRR are open-source projects, promoting community collaboration. Gateway API is a newer way to manage traffic to Kubernetes cluster. For on prem-clusters, install load balancer using metallb * Add metallb helm chart, download and install metallb .. code-block:: helm repo add metallb https://metallb.github.io/metallb wget https://raw.githubusercontent.com/metallb/metallb/main/charts/metallb/values.yaml helm install metallb metallb/metallb --values values.yaml * Verify metallb is deployed .. code-block:: kubectl -n default get pods * Prepare the metallb Ip files(metallb_ip.yaml), and modify the IP address (with range provided by your network team) .. code-block:: apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: default spec: addresses: - 172.16.20.16-172.16.20.23 <- Change this to your range of IP autoAssign: true --- apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: default spec: ipAddressPools: - default * Apply IP address pool range .. code-block:: kubectl apply -f metallb_ip.yaml * Verify metallb ip address pool .. code-block:: kubectl get IPAddressPool kubectl describe IPAddressPool * Setup :ref:`Gateway APIs` * For non-secure connections (dev clusters), install steps 1 to 4 * For secure connections, install additional steps 5 to 10