我在用 Kubeadm 安装 Kubernetes 时遇到了几个问题。我在公司网络背后工作。我在会话环境中声明了代理设置。
$ export http_proxy=http://proxy-ip:port/
$ export https_proxy=http://proxy-ip:port/
$ export no_proxy=master-ip,node-ip,127.0.0.1
Run Code Online (Sandbox Code Playgroud)
在安装了所有必要的组件和依赖项后,我开始初始化集群。为了使用当前的环境变量,我使用了sudo -E bash.
$ sudo -E bash -c "kubeadm init --apiserver-advertise-address=192.168.1.102 --pod-network-cidr=10.244.0.0/16"
Run Code Online (Sandbox Code Playgroud)
然后输出消息永远挂在下面的消息上。
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] Starting the kubelet service
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring …Run Code Online (Sandbox Code Playgroud) 我正在尝试在一个主节点、一个工作节点设置上安装 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
Run Code Online (Sandbox Code Playgroud)
我尝试过的事情:
hostname与hostname -f所有节点上的相同unset http_proxy https_proxy在主节点上,如https://github.com/kubernetes/kubernetes/issues/54918#issuecomment-385162637 所述/etc/resolve.conf为 have nameserver 8.8.8.8,如上所述https://github.com/kubernetes/kubernetes/issues/48798#issuecomment-452172710 所述{ "cniVersion": "0.2.0", "name": "openshift-sdn", "type": "openshift-sdn" …