lsmod|grep ip_vs
modprobe -- ip_vs
modprobe -- ip_vs_rr
modprobe -- ip_vs_wrr
modprobe -- ip_vs_sh
modprobe -- nf_conntrack_ipv4
yum install ipvsadm ipset -y
kubectl edit configmap kube-proxy -n kube-system
minSyncPeriod: 0s
scheduler: ""
syncPeriod: 30s
kind: KubeProxyConfiguration
metricsBindAddress: 127.0.0.1:10249
mode: "ipvs" # 修改此处
nodePortAddresses: null
kubectl delete pod xxx -n kube-system
kubectl logs kube-proxy-xxx -n kube-system
日志出现Using ipvs Proxier
即可
kubectl get svc --all-namespaces
# ipvsadm -ln
#可以看到service对应的很多规则