我正在尝试通过kubeadm将(WINDOWS Server 2016)节点(工作人员)加入(RHEL 7.5)主节点。 我正在按照以下教程进行操作: https://kubernetes.io/docs/setup/independent/install-kubeadm/ https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ https://docs.microsoft.com/en-us/virtualization/windowscontainers/kubernetes/getting-started-kubernetes-windows
作为网络连接,我使用Flannel: https://github.com/Microsoft/SDN/tree/master/Kubernetes/flannel/l2bridge
我的主节点按预期方式工作-kubectl get pods --all-namespaces
所有Pod正在运行。在WS2016上执行以下命令期间:
kubeadm join --token <token> <master-ip>:<master-port> --discovery-token-ca-cert-hash sha256:<hash>
我有错误: nodeRegistration.criSocket:无效值:“ / var / run / dockershim.sock”:路径不是绝对的
kubeadm配置中的默认路径为“ /var/run/dockershim.sock”。
在WS2016上我也不能做任何拉取图像:
docker run hello-world
无法在本地找到图片“ hello-world:latest” C:\ Program Files \ Docker \ docker.exe:来自守护程序的错误响应:Get https://registry-1.docker.io/v2/:proxyconnect tcp:up proxy.example.com:无此类主机。
有用的链接: https://kubernetes.io/docs/getting-started-guides/windows/
我也尝试使用Windows Server 1709版执行此操作,但是存在相同的问题。 下面我写出详细信息:
大师:
kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:14:39Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:17:28Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:08:19Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:08:18 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:10:42 2018
OS/Arch: linux/amd64
Experimental: false
工人:
kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350
reeState:"clean", BuildDate:"2018-07-17T18:50:16Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"windows/amd64"}
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d90335045
eState:"clean", BuildDate:"2018-07-17T18:53:20Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: proxyconnect tcp: dial tcp: lookup proxy.example.com: no such host
Client:
Version: 17.06.2-ee-16
API version: 1.30
Go version: go1.8.7
Git commit: 9ef4f0a
Built: Thu Jul 26 16:43:19 2018
OS/Arch: windows/amd64
Server:
Engine:
Version: 17.06.2-ee-16
API version: 1.30 (minimum version 1.24)
Go version: go1.8.7
Git commit: 9ef4f0a
Built: Thu Jul 26 16:52:17 2018
OS/Arch: windows/amd64
Experimental: false
编辑: 我通过创建其他VM解决了docker问题,但仍然有: nodeRegistration.criSocket:无效值:“ / var / run / dockershim.sock”:路径不是绝对路径:/var/run/dockershim.sock 我发现,我需要将--cri-socket更改为tcp:// localhost:2375,但我不知道如何。以下命令不起作用(在WS2016上):
kubeadm config upload from-flags --cri-socket=tcp://localhost:2375 --kubeconfig="C:\k\config"
有人知道如何改变吗?