禁用NetworkManager

systemctl stop NetworkManager

systemctl disable NetworkManager

网卡配置静态IP

/etc/sysconfig/network-scripts/ifcfg-ens160

BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.18.125
PREFIX=24
GATEWAY=192.168.18.1


[root@k8s-node1 ~]# cat /etc/resolv.conf

nameserver 192.168.18.1 # 网关地址