Can I have identical config on all Keepalived nodes?

Solution 1:

Kubernetes itself supplies "cattle" services to applications. Although a lot of the "master" kubernetes services are based on the same infrastructure, at some point you need to bootstrap a service with something lower level to get it all started up.

keepalived as configured in the linked kubernetes docco provides a single VRRP virtual IP address as the highly available endpoint shared between the masters.

The nodes all configure the same VRRP IP address (or name) and keepalived moves that address around the masters. The "election" is completed in the keepalived healthcheck and failover logic.

An alternative to this method is to move the load balancing decision out to an external device or the clients. You can run a reverse proxy on each node (like haproxy) that can weight the kube-api servers and complete the healthchecks.