[kubeadm]错误更新cni配置

时间:2017-01-04 02:41:49

标签: docker kubernetes

尝试使用“kubeadm init”命令设置集群时,我在/ var / log / messages中收到错误消息:

e4dad33)": pods "kube-scheduler-master" already exists
Jan  3 21:28:45 master kubelet: I0103 21:28:45.777830    8726 kubelet_node_status.go:204] Setting node annotation to enable volume controller attach/detach
Jan  3 21:28:46 master kubelet: I0103 21:28:46.829714    8726 kubelet_node_status.go:204] Setting node annotation to enable volume controller attach/detach
Jan  3 21:28:47 master kubelet: I0103 21:28:47.015478    8726 kubelet_node_status.go:74] Attempting to register node master
Jan  3 21:28:47 master kubelet: I0103 21:28:47.027349    8726 kubelet_node_status.go:77] Successfully registered node master
Jan  3 21:28:52 master kubelet: E0103 21:28:52.761903    8726 cni.go:163] error updating cni config: No networks found in /etc/cni/net.d
Jan  3 21:29:02 master kubelet: E0103 21:29:02.762461    8726 cni.go:163] error updating cni config: No networks found in /etc/cni/net.d

我的Linux版本是:

[root@master ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 

Docker版本是:

[root@master ~]# docker -v
Docker version 1.12.5, build 7392c3b

Kubernetes版本:

[root@master ~]# kubeadm version
kubeadm version: version.Info{Major:"1", Minor:"6+", GitVersion:"v1.6.0-alpha.0.2074+a092d8e0f95f52", GitCommit:"a092d8e0f95f5200f7ae2cba45c75ab42da36537", GitTreeState:"clean", BuildDate:"2016-12-13T17:03:18Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}

泊坞容器:

[root@master ~]# docker ps 
CONTAINER ID        IMAGE                                                           COMMAND                  CREATED             STATUS              PORTS               NAMES
f9d197b32eeb        gcr.io/google_containers/kube-controller-manager-amd64:v1.5.1   "kube-controller-mana"   8 minutes ago       Up 8 minutes                            k8s_kube-controller-manager.c989015b_kube-controller-manager-master_kube-system_403e1523940e3f352d70e32c97d29be5_812fd5f5
cc196346d2fa        gcr.io/google_containers/kube-scheduler-amd64:v1.5.1            "kube-scheduler --add"   8 minutes ago       Up 8 minutes                            k8s_kube-scheduler.acb91962_kube-scheduler-master_kube-system_3bfbd36dfb8c8f71984a0d812e4dad33_7b6cc90e
5340aebc6aa4        gcr.io/google_containers/kube-apiserver-amd64:v1.5.1            "kube-apiserver --ins"   8 minutes ago       Up 8 minutes                            k8s_kube-apiserver.7fe53ba_kube-apiserver-master_kube-system_d74382f649787a7b1081e1a2b36071dd_a8b18f5f
6b56cda441d6        gcr.io/google_containers/etcd-amd64:3.0.14-kubeadm              "etcd --listen-client"   8 minutes ago       Up 8 minutes                            k8s_etcd.c323986f_etcd-master_kube-system_3a26566bb004c61cd05382212e3f978f_80669ce9
6fe1004d404d        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 8 minutes ago       Up 8 minutes                            k8s_POD.d8dbe16c_kube-controller-manager-master_kube-system_403e1523940e3f352d70e32c97d29be5_a65251b2
434d49024d1f        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 8 minutes ago       Up 8 minutes                            k8s_POD.d8dbe16c_kube-scheduler-master_kube-system_3bfbd36dfb8c8f71984a0d812e4dad33_f8d4ad55
e5da18222b52        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 8 minutes ago       Up 8 minutes                            k8s_POD.d8dbe16c_kube-apiserver-master_kube-system_d74382f649787a7b1081e1a2b36071dd_187a58df
66de3a3ad7e9        gcr.io/google_containers/pause-amd64:3.0                        "/pause"                 8 minutes ago       Up 8 minutes                            k8s_POD.d8dbe16c_etcd-master_kube-system_3a26566bb004c61cd05382212e3f978f_d58fa3b8

已经安装了CNI:

[root@master ~]# yum list |grep kubernetes-cni.x86_64 
kubernetes-cni.x86_64                      0.3.0.1-0.07a8a2            @kubernetes

任何人都面临类似的问题?

1 个答案:

答案 0 :(得分:1)

您只需安装某种(第三方)Pod网络,如指南中所述。

就个人而言,我使用Weave或Flannel。例如,你可以这样安装Weave:

kubectl apply -f https://git.io/weave-kube

尽管如此,还有许多其他Pod网络提供商,请参阅http://kubernetes.io/docs/admin/addons/

Kubernetes专注于网络本身,而是为Weave和Flannel等第三方解决方案提供接口。