Installing a load balancer

Managed Kubernetes services such as Google or IBM Cloud will provide an external load balancer. Since our Kubernetes environment is standalone, we do not have an external load balancer; we install and use keepalived as a load balancer.

The keepalived load balancer depends on the ip_vs kernel module to be loaded. Follow these steps:

  1. Make sure that the ip_vs kernel module is loaded:
$ sudo lsmod | grep ^ip_vsip_vs_wlc 12519 0ip_vs 145497 2 ip_vs_wlc
  1. If the preceding does not show any output, load the module:
$ sudo ipvsadm -lnIP Virtual Server version 1.2.1 (size=4096)Prot LocalAddress:Port Scheduler Flags  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
  1. Run sudo lsmod | grep ^ip_vs to make sure that ...

Get Mastering Service Mesh now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.