kubernetes ipvs mode
Open kernel parameters
cat >> /etc/sysctl.conf << EOF
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
sysctl -p
Support open ipvs
yum -y install ipvsadm ipset
# 临时生效
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
modprobe -- nf_conntrack_ipv4
# 永久生效
cat > /etc/sysconfig/modules/ipvs.modules <<EOF
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
modprobe -- nf_conntrack_ipv4
EOF
Modify the configuration file kube-proxy.service, add configuration
--proxy-mode=ipvs \
--masquerade-all=true
Proxy-restart Kube
journalctl -u Kube-Proxy view the boot log
server_others.go: 189] Using ipvs Proxier represent enabled ipvs.
By ipvsadm -Ln to see if the entry into force