kube-proxy

Failed to delete stale service IP

描述:
kube-proxy 报错 Failed to delete stale service IP,查看日志:
6月 19 09:57:07 node1 kube-proxy[17770]: E0619 09:57:07.022125 17770 proxier.go:1319] Failed to delete stale service IP 10.254.0.2 connections, error: error deleting connection tracking state for UDP service IP: 10.254.0.2, error: error looking for path of conntrack: exec: “conntrack”: executable file not found in $PATH

解决:
yum -y install conntrack ,重启 kube-proxy

forbbidden

描述:
Apr 24 09:22:05 m1 kube-proxy: E0424 09:22:05.116806 1347 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.Service: services is forbidden: User “system:kube-proxy” cannot list resource “services” in API group “” at the cluster scope

网络插件

删除 calico 换成 flannel 后容器启动异常

描述:
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox error getting ClusterInformation: connection is unauthorized: Unauthorized=

Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container “36e33a7964d7b257384026e8f52b4c8807668247e586ccd7a93dd82781d4f58d” network for pod “coredns-7ff77c879f-q8brs”: networkPlugin cni failed to set up pod “coredns-7ff77c879f-q8brs_kube-system” network: error getting ClusterInformation: connection is unauthorized: Unauthorized, failed to clean up sandbox container “36e33a7964d7b257384026e8f52b4c8807668247e586ccd7a93dd82781d4f58d” network for pod “coredns-7ff77c879f-q8brs”: networkPlugin cni failed to teardown pod “coredns-7ff77c879f-q8brs_kube-system” network: error getting ClusterInformation: connection is unauthorized: Unauthorized]

解决:
删除掉集群所有节点 /etc/cni/net.d/ 目录下的 calico 配置文件后,pod自动恢复正常。