我已经在 digital ocean 中建立了一个新的服务器,ubuntu 16.04。从 ubuntu repos 安装了 docker,并根据本指南设置了 kuberenetes:
https://kubernetes.io/docs/setup/independent/install-kubeadm/
我尝试过几次,kubeadm init
在再次尝试之前请遵循kubeadm reset
。
输出日志建议检查是否kubelet
正在运行,并且确实如此:
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Wed 2018-09-05 13:34:35 UTC; 24min ago
Docs: https://kubernetes.io/docs/home/
Main PID: 2615 (kubelet)
Tasks: 15
Memory: 44.8M
CPU: 3min 18.521s
CGroup: /system.slice/kubelet.service
└─2615 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --cni-bin
Sep 05 13:59:15 kubernetes-master kubelet[2615]: E0905 13:59:15.538370 2615 kubelet.go:2110] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin
Sep 05 13:59:17 kubernetes-master kubelet[2615]: E0905 13:59:17.518350 2615 kubelet_node_status.go:103] Unable to register node "kubernetes-master" with API server: Post https://48.88.103.0:6443/api/v1/nodes
Sep 05 13:59:18 kubernetes-master kubelet[2615]: E0905 13:59:18.552653 2615 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:455: Failed to list *v1.Service: Get https://48.88.103.0:6443/api/v1/ser
Sep 05 13:59:19 kubernetes-master kubelet[2615]: E0905 13:59:19.659689 2615 reflector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:464: Failed to list *v1.Node: Get https://48.88.103.0:6443/api/v1/nodes?
Sep 05 13:59:20 kubernetes-master kubelet[2615]: W0905 13:59:20.556075 2615 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d
Sep 05 13:59:20 kubernetes-master kubelet[2615]: E0905 13:59:20.576691 2615 kubelet.go:2110] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin
Sep 05 13:59:21 kubernetes-master kubelet[2615]: E0905 13:59:21.952965 2615 certificate_manager.go:299] Failed while requesting a signed certificate from the master: cannot create certificate signing request:
Sep 05 13:59:23 kubernetes-master kubelet[2615]: E0905 13:59:23.817566 2615 eviction_manager.go:243] eviction manager: failed to get get summary stats: failed to get node info: node "kubernetes-master" not fo
Sep 05 13:59:24 kubernetes-master kubelet[2615]: I0905 13:59:24.524068 2615 kubelet_node_status.go:269] Setting node annotation to enable volume controller attach/detach
Sep 05 13:59:24 kubernetes-master kubelet[2615]: I0905 13:59:24.594325 2615 kubelet_node_status.go:79] Attempting to register node kubernetes-master
它还建议检查网络连接以及图像是否能够下载。我通过 ping 网络外部并检查是否kubeadm config images pull
执行成功进行了验证。
我确实看到,TLS handshake timeout
当它尝试访问服务器的 IP 地址时,在 journalctl 日志中收到了很多信息。
我在网上看到很多关于这个问题的讨论,但到目前为止,现有的解决方案都对我没有任何帮助。
我还可以测试/检查/尝试什么?