起因:

配置kubernetes集群master高可用期间发现keepalived 配置健康检查后,启动报错。

报错内容

Keepalived_vrrp: Registering gratuitous ARP shared channel
Keepalived_vrrp: Opening file '/etc/keepalived/keepalived.conf'

Keepalived_vrrp: WARNING - default user 'keepalived_script' for script execution does not exist - please create.

Keepalived_vrrp: Truncating auth_pass to 8 characters
Keepalived_vrrp: Unable to access script `curl`
Keepalived_vrrp: Disabling track script Check.keepalived since not found
Keepalived_vrrp: VRRP_Instance(VI_1) removing protocol VIPs.

解决办法:

配置文件添加运行健康检查脚本的用户或者组即可


global_defs {
   router_id k8s

#添加内容如下:
   script_user root
   enable_script_security 

}