cookeem / kubeadm-ha

通过kubeadm安装kubernetes高可用集群,使用docker/containerd容器运行时,适用v1.24.x以上版本
MIT License
678 stars 275 forks source link

exited due to signal 15 when check keepalived status #53

Closed GangChenTFS closed 5 years ago

GangChenTFS commented 5 years ago

When I checked the keepalived status, I found it´s not work. I use an external VIP 10.159.222.x k8s-master-lb, and the external VIP have ability to point to the 3 masters, I configured 3 masters successfully, but it seems the keepalived are not work correctly. would you please help to confirm below questions:

  1. kubeadm-ha solution can use the external VIP?
  2. the pre-assigned VIP for your case 192.168.20.10 / k8s-master-lb, who will create it and how does it combine with the 3 masters IP and hosts?

    $ systemctl status keepalived ● keepalived.service - LVS and VRRP High Availability Monitor Loaded: loaded (/usr/lib/systemd/system/keepalived.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2019-01-31 15:16:05 WET; 2h 9min ago Process: 14343 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS) Main PID: 14344 (keepalived) Tasks: 6 Memory: 5.7M CGroup: /system.slice/keepalived.service ├─14344 /usr/sbin/keepalived -D ├─14345 /usr/sbin/keepalived -D ├─14346 /usr/sbin/keepalived -D ├─20865 /usr/sbin/keepalived -D ├─20866 /bin/bash /etc/keepalived/check_apiserver.sh └─20871 sleep 5

Jan 31 17:25:16 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:21 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:26 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:31 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:36 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:41 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:46 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:51 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:25:56 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Jan 31 17:26:01 k8s-master02 Keepalived_vrrp[14346]: /etc/keepalived/check_apiserver.sh exited due to signal 15

cookeem commented 5 years ago

This tutorial the keepalived is running in an offline internal network, if you run it in cloud provider environment, you should use cloud provider ‘s load balancer instead of keepalived.

Vip is an static IP address all masters can reach and not conflict in the network, at this point you should ask your network maintain team which IP address you can used as vip

GangChenTFS commented 5 years ago

@cookeem my keepalived is running in an office networks without cloud provider environment. I requested VIP with static IP address on all masters, the ip is fix and unique in our office networks, I configured it, the 3 master status are working well, but the keepalive are not show correct status, below is the error info, it´s seems the password is invalid. is it related with "K8SHA_KEEPALIVED_AUTH"? do you know how get this key in my kubernetes cluster? thanks.

systemctl status keepalived.service

● keepalived.service - LVS and VRRP High Availability Monitor Loaded: loaded (/usr/lib/systemd/system/keepalived.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2019-02-11 17:25:20 WET; 1 day 17h ago Process: 32556 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS) Main PID: 32557 (keepalived) Tasks: 6 Memory: 1.9M CGroup: /system.slice/keepalived.service ├─29595 /usr/sbin/keepalived -D ├─29596 /bin/bash /etc/keepalived/check_apiserver.sh ├─29602 sleep 5 ├─32557 /usr/sbin/keepalived -D ├─32558 /usr/sbin/keepalived -D └─32559 /usr/sbin/keepalived -D

Feb 13 11:10:37 k8s-master01 Keepalived_vrrp[32559]: (VI_1): received an invalid passwd! Feb 13 11:10:37 k8s-master01 Keepalived_vrrp[32559]: bogus VRRP packet received on eth0 !!! Feb 13 11:10:37 k8s-master01 Keepalived_vrrp[32559]: VRRP_Instance(VI_1) ignoring received advertisment... Feb 13 11:10:38 k8s-master01 Keepalived_vrrp[32559]: /etc/keepalived/check_apiserver.sh exited due to signal 15 Feb 13 11:10:38 k8s-master01 Keepalived_vrrp[32559]: (VI_1): received an invalid passwd! Feb 13 11:10:38 k8s-master01 Keepalived_vrrp[32559]: bogus VRRP packet received on eth0 !!! Feb 13 11:10:38 k8s-master01 Keepalived_vrrp[32559]: VRRP_Instance(VI_1) ignoring received advertisment... Feb 13 11:10:39 k8s-master01 Keepalived_vrrp[32559]: (VI_1): received an invalid passwd! Feb 13 11:10:39 k8s-master01 Keepalived_vrrp[32559]: bogus VRRP packet received on eth0 !!! Feb 13 11:10:39 k8s-master01 Keepalived_vrrp[32559]: VRRP_Instance(VI_1) ignoring received advertisment...

cookeem commented 5 years ago

Can you show me all the keepalived.conf files? Make sure all this segment is the same:

    authentication {
        auth_type PASS
        auth_pass K8SHA_KA_AUTH
    }
GangChenTFS commented 5 years ago

below is the output, as same as setup in create-config.sh, thanks.

authentication { auth_type PASS auth_pass 412f7dc3bfed32194d1600c483e10ad1d }

$ cat create-config.sh

keepalived auth_pass config

export K8SHA_KEEPALIVED_AUTH=412f7dc3bfed32194d1600c483e10ad1d


发件人: cookeem notifications@github.com 发送时间: 2019年2月14日 2:12 收件人: cookeem/kubeadm-ha 抄送: henshitou; Author 主题: Re: [cookeem/kubeadm-ha] exited due to signal 15 when check keepalived status (#53)

Can you show me all the keepalived.conf files? Make sure all this segment is the same:

authentication {
    auth_type PASS
    auth_pass K8SHA_KA_AUTH
}

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cookeem/kubeadm-ha/issues/53#issuecomment-463457288, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfZplMVAVc9BCQ-_xWJUd32sFc4DxAanks5vNMX0gaJpZM4ac0N6.

GangChenTFS commented 5 years ago

workaround is disable these line in keepalived.conf