KubeAdm无法配置-无法连接到服务器:EOF

时间:2019-03-04 16:27:41

标签: kubernetes kubeadm

在ubuntu 18.06上配置运行Kubeadm的K8S时遇到问题。

在主节点1上执行kubeadm-init之后,一切顺利:

copy_to

所以我在执行以下命令后执行:

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

You can now join any number of machines by running the following on each node
as root:

  kubeadm join 172.40.0.10:6443 --token oormjp.gf43botx19purn13 --discovery-token-ca-cert-hash sha256:5e9c917221233fdae445640415fac123204f41d31d072cd06545055187c860e2

当我测试kubeclt版本时,我得到了:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
export KUBECONFIG=/etc/kubernetes/admin.conf

当我要安装编织或法兰绒之类的CNI时,会得到:

无法连接到服务器:EOF

这是kubeadm使用的Yaml配置文件:

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-02-28T13:37:52Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Unable to connect to the server: EOF

172.40.0.10:是HAProxy服务器。

有人可以帮我调试吗?

1 个答案:

答案 0 :(得分:0)

使用“ 绒布” pod网络查看要求,请运行:

  通过运行sysctl> net.bridge.bridge-nf-call-iptables = 1将/ proc / sys / net / bridge / bridge-nf-call-iptables设置为1,将桥接的IPv4流量传递到iptables'   链条

您可以找到更多信息here