VIP Configuration Enhancements
Multiple virtual IP (VIP) groups can be configured for use by the applications being deployed in the K8s cluster. SMI’s cluster deployer logic has been enhanced to check if any IPv4 or IPv6 VIP address has been assigned to more than one VIP group. If the same VIP address has been assigned to multiple VIP groups, the deployment configuration validation will fail.
The following is a sample erroneous VIP groups configuration and a sample of the resulting error message logged through the validation:
Example Erroneous keepalived Configuration |
Example Error Message |
---|---|
|
Manual validation:
|
The keepalived_config container monitors the configmap vip-config for any changes at regular intervals and if a change is detected the keepalived configuration file is reloaded.
With this enhancement, either all or none of the VIP addresses configured in a VIP group must be present on a node. If only some of the addresses exist on the node, that keepalived process wil be stopped and a new process is automatically started and apply the latest configuration. This ensures that the keepalived processes assign those IP addresses appropriately.
The following is an example of the resulting error message logged through the validation:
kubectl logs keepalived-zqlzp -n smi-vips -c keepalived-config --tail 50 --follow
container
INFO:root:group name :rep2
INFO:root:Ip address: 192.168.139.85 on interface ens224 found on this device: True
INFO:root:Ip address: 192.168.139.95 on interface ens256 found on this device: False
INFO:root:Error Occurred: All VIPs in /config/keepalived.yaml must be either present or absent in this device
INFO:root:VIP Split brain Scenario: Restarting the keepalived process.
Monitoring Virtual IPs for Multiple Ports
SMI Cluster Deployer supports monitoring the Virtual IP for a single port using the check-port command.
virtual-ips rep2
check-port 25
vrrp-interface ens224
vrrp-router-id 188
check-interface ens256
exit
Now, the cluster deployer is enhanced to monitor the VIP for multiple ports.
For multiple ports, use check-ports command:
virtual-ips rep2
check-ports [ 25 80 43 65]
vrrp-interface ens224
vrrp-router-id 188
check-interface ens256
exit
Note | Use either check-port or check-ports during configuration, but not both. |