错误:

[root@master02 ~]# kubectl get nodes
NAME             STATUS     ROLES    AGE   VERSION
192.168.109.88   NotReady   <none>   37h   v1.12.3
192.168.109.99   NotReady   <none>   37h   v1.12.3

原因:发现是VIP消失

[root@lb01 nginx]#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:61:b8:f7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.109.33/24 brd 192.168.109.255 scope global noprefixroute ens32
       valid_lft forever preferred_lft forever
    inet6 fe80::f8d0:d3ca:8356:8428/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:6e:5b:ea brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:6e:5b:ea brd ff:ff:ff:ff:ff:ff

解决:

[root@lb01 ~]#pkill nginx
[root@lb01 ~]#systemctl start nginx
[root@lb01 ~]#systemctl start keepalived
[root@lb01 ~]#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:61:b8:f7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.109.33/24 brd 192.168.109.255 scope global noprefixroute ens32
       valid_lft forever preferred_lft forever
    inet 192.168.109.100/24 scope global secondary ens32
       valid_lft forever preferred_lft forever
    inet6 fe80::f8d0:d3ca:8356:8428/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:6e:5b:ea brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:6e:5b:ea brd ff:ff:ff:ff:ff:ff
[root@master01 ~]#kubectl get nodes
NAME             STATUS   ROLES    AGE   VERSION
192.168.109.88   Ready    <none>   38h   v1.12.3
192.168.109.99   Ready    <none>   37h   v1.12.3

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐