gpt4 book ai didi

docker - [kubeadm] 更新 cni 配置时出错

转载 作者:行者123 更新时间:2023-12-02 12:23:05 24 4
gpt4 key购买 nike

尝试使用命令“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"}

docker 容器:
[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

有小伙伴遇到类似问题吗?

最佳答案

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

就个人而言,我使用的是 Weave 或 Flannel。例如,您可以通过这种方式安装 Weave:

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

也就是说,还有许多其他 Pod 网络提供商,请参阅 http://kubernetes.io/docs/admin/addons/ .

Kubernetes 关注的不是网络本身,而是为第三方解决方案提供一个接口(interface),比如 Weave 和 Flannel。

关于docker - [kubeadm] 更新 cni 配置时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41455399/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com