我正在尝试在一个主节点、一个工作节点设置上安装 Openshift 3.11。
安装失败,我可以在journalctl -r
中看到:
2730 kubelet.go:2101] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
2730 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d
我尝试过的事情:
- 重新启动主节点
- 确保
hostname
与所有节点上的hostname -f
相同 - 禁用主节点上的 IP 转发,如 https://github.com/openshift/openshift-ansible/issues/7967#issuecomment-405196238 和 https://linuxconfig.org/how-to-turn-on-off-ip-forwarding-in-linux 中所述
- 在主节点上应用 kube-法兰绒,如 https://stackoverflow.com/a/54779881/265119 中所述
unset http_proxy https_proxy
在主节点上,如 https://github.com/kubernetes/kubernetes/issues/54918#issuecomment-385162637 中所述- 修改
/etc/resolve.conf
以具有nameserver 8.8.8.8
,如 https://github.com/kubernetes/kubernetes/issues/48798#issuecomment-452172710 中所述 - 创建了一个包含内容
{ "cniVersion": "0.2.0", "name": "openshift-sdn", "type": "openshift-sdn" }
的文件/etc/cni/net.d/80-openshift-network.conf,如 https://stackoverflow.com/a/55743756/265119 中所述
最后一步似乎确实允许主节点准备就绪,但是 ansible openshift 安装程序仍然失败并Control plane pods didn't come up
.
有关问题的更详细说明,请参阅 https://github.com/openshift/openshift-ansible/issues/11874
连同步骤 6: 确保主机名和主机名 -f 机器人返回主机的 FQDN。
https://github.com/openshift/openshift-ansible/issues/10798
错误是使用了太新版本的 Ansible。
降级到 Ansible 2.6 解决了这个问题。