1 kube-proxy报错 "--random-fully"

解决:
# yum install gcc make libnftnl-devel libmnl-devel autoconf automake libtool bison flex  libnetfilter_conntrack-devel libnetfilter_queue-devel libpcap-devel -y

编译安装iptables
# export LC_ALL=C
# wget wget https://www.netfilter.org/projects/iptables/files/iptables-1.6.2.tar.bz2
# tar -xvf iptables-1.6.2.tar.bz2
# cd iptables-1.6.2
# ./autogen.sh
# ./configure
# make -j4
# make install
# 覆盖
cd /usr/local/sbin
\cp iptables /sbin
\cp iptables-restore /sbin/
\cp iptables-save /sbin/
可以把/usr/local/sbin下面的iptables相关的东西打包然后分发到其它服务器

重启 kube-proxy 与 kubelet
systemctl restart kubelet.service kube-proxy.service

 

 

2 "conntrack"报错

Sep 11 13:15:27 k8s-master2 kube-proxy[6987]: E0911 13:15:27.470575    6987 proxier.go:1598] Failed to delete stale service IP 10.0.0.2 connections, error: error deleting connection tracking state for UDP service IP: 10.0.0.2, error: error looking for path of conntrack: exec: "conntrack": executable file not found in $PATH
解决:
  # yum install conntrack -y 
  #iptables -F
  #systemctl restart docker
  #systemctl restart kube-proxy