我有3个节点的kubernetes集群,有2个linux (1个master和1个worker )和1个windows server 2019核心虚拟机。我尝试在上面部署windows应用程序,但出现了错误network: read /run/flannel/subnet.env: The handle is invalid.
我试着这样做:
kubeadm init --pod-network-cidr=10.244.0.0/16我可以部署linux应用程序,只有windows应用程序有问题。Pod正在调度到windows工作节点,但没有一个正在运行,所有Pod都处于容器创建状态。当我检查上面的日志时,每个pod都是错误的。
以下是Windows上.\flanneld.exe的输出:
> I0410 15:07:01.699217 11704 main.go:514] Determining IP address of default interface I0410 15:07:02.023840 11704 main.go:527] Using
> interface with name vEthernet (Ethernet0) and address <IP Address>
> I0410 15:07:02.023840 11704 main.go:544] Defaulting external address
> to interface address (<IP Address>) E0410 15:07:02.026800 11704
> main.go:605] Couldn't fetch previous FLANNEL_SUBNET from subnet file
> at /run/flannel/subnet.env: read /run/flannel/subnet.env: The handle
> is invalid. I0410 15:07:02.026800 11704 main.go:244] Created subnet
> manager: Etcd Local Manager with Previous Subnet: None I0410
> 15:07:02.027804 11704 main.go:247] Installing signal handlers E0410
> 15:07:04.034674 11704 main.go:382] Couldn't fetch network config:
> client: etcd cluster is unavailable or misconfigured; error #0: dial
> tcp 127.0.0.1:2379: connectex: No connection could be made because the
> target machine actively refused it. ; error #1: dial tcp
> 127.0.0.1:4001: i/o timeout timed out E0410 15:08:14.027848 11704 main.go:382] Couldn't fetch network config: client: etcd cluster is
> unavailable or misconfigured; error #0: dial tcp 127.0.0.1:2379: i/o
> timeout ; error #1: dial tcp 127.0.0.1:4001: i/o timeout timed out
> E0410 15:08:17.053635 11704 main.go:382] Couldn't fetch network
> config: client: etcd cluster is unavailable or misconfigured; error
> #0: dial tcp 127.0.0.1:2379: i/o timeout ; error #1: dial tcp 127.0.0.1:4001: i/o timeoutC:\run\flannel\subnet.exe的输出
> FLANNEL_NETWORK=10.244.0.0/16
> FLANNEL_SUBNET=10.244.1.1/24
> FLANNEL_MTU=1450
> FLANNEL_IPMASQ=true发布于 2020-04-16 11:41:23
我已经通过在windows上重新部署flannel解决了这个问题,因为首先当我部署/run/flannel/subnet.env时,/run/flannel/subnet.env不在那里,然后我手动创建了/run/flannel/subnet.env并保留了上面提到的信息。后来,我再次尝试在集群上部署windows应用程序,得到了一个错误: flanneld service is cluster。所以我重新部署了它。
https://stackoverflow.com/questions/61137765
复制相似问题