部署DNS加载项时出错

时间:2017-09-14 12:20:21

标签: kubernetes coreos

我按照https://coreos.com/kubernetes/docs/1.6.1/getting-started.html的步骤在CoreOS计算机上安装Kubernetes。

当我拿到吊舱时,看起来一切正常。

./ kubectl get pods --namespace = kube-system

NAME                                     READY     STATUS              RESTARTS   AGE
calico-node-12g51                        2/2       Running             4          1h
calico-node-dtzss                        2/2       Running             6          1h
calico-node-p35sl                        2/2       Running             4          1h
calico-policy-controller-kh7lz           1/1       Running             2          1h
kube-apiserver-10.201.101.234            1/1       Running             3          2h
kube-controller-manager-10.201.101.234   1/1       Running             3          2h
kube-proxy-10.201.101.234                1/1       Running             3          2h
kube-proxy-10.201.101.236                1/1       Running             7          2d
kube-proxy-10.201.101.237                1/1       Running             5          1d
kube-scheduler-10.201.101.234            1/1       Running             3          2h

然后,我按照https://coreos.com/kubernetes/docs/1.6.1/deploy-addons.html的步骤部署DNS加载项。

在该步骤之后,我看到kube-dns pod永远处于ContainerCreating状态。

kube-dns-v20-htqvx    0/3       ContainerCreating   0          16m

./ kubectl describe pod kube-dns-v20-htqvx --namespace = kube-system给出了以下日志。

 FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason          Message
  ---------     --------        -----   ----                    -------------   --------        ------          -------
  16m           16m             1       default-scheduler                       Normal          Scheduled       Successfully assigned kube-dns-v20-htqvx to 10.201.101.237
  15m           15m             1       kubelet, 10.201.101.237                 Warning         FailedSync      Error syncing pod, skipping: failed to "CreatePodSandbox" for "kube-dns-v20-htqvx_kube-system(e3f84b85-990d-11e7-9392-005056a16f20)" with CreatePodSandboxError: "CreatePodSandbox for pod \"kube-dns-v20-htqvx_kube-system(e3f84b85-990d-11e7-9392-005056a16f20)\" failed: rpc error: code = 2 desc = NetworkPlugin cni failed to set up pod \"kube-dns-v20-htqvx_kube-system\" network: Get https://10.3.0.1:443/api/v1/namespaces/kube-system/pods/kube-dns-v20-htqvx: dial tcp 10.3.0.1:443: i/o timeout"

我看到拨号tcp 10.3.0.1:443:i / o超时错误

我认为我的安装有问题。你能帮忙吗?

1 个答案:

答案 0 :(得分:0)

当我没有正确配置CNI时,我看到了这种问题。您使用旧版本的kubernetes。我建议使用最新版本。

这一步将会带来更好的结果。

https://cwienczek.com/multi-node-kubernetes-cluster-on-vagrant-in-five-minutes/