Unable to connect to the server: dial tcp 192.168.0.132:16443: connect: no route to host解决

项目场景:

vmware部署k8s集群,用于学习。挂起vm后重新启动,执行任何命令都报如下提示:

Unable to connect to the server: dial tcp 192.168.0.132:16443: connect: no route to host

查询显卡信息,发现虚拟ip:132未生效:

ip a s ens33
2: ens33:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether xxxxxxxxxxxxxxxxxxxxxx
    inet 192.168.0.130/24 brd 192.168.0.255 scope global ens33
       valid_lft forever preferred_lft forever
    inet6 xxxxxxxxxxxxxxxxxxxxxx scope link 
       valid_lft forever preferred_lft forever

重启keepalived,问题解决

# systemctl restart keepalived.service
# ip a s ens33
2: ens33:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether xxxxxxxxxxxxxxxxxxxxxx
    inet 192.168.0.130/24 brd 192.168.0.255 scope global ens33
       valid_lft forever preferred_lft forever
    inet 192.168.0.132/32 scope global ens33
       valid_lft forever preferred_lft forever
    inet6xxxxxxxxxxxxxxxxxxxxxx scope link 
       valid_lft forever preferred_lft forever

你可能感兴趣的:(bug,devops,运维)