RE: 部署 k8s Cluster(上) — Kubernetes(5)

You are viewing a single comment's thread from:

部署 k8s Cluster(上) — Kubernetes(5)

in kubernetes •  7 years ago 

[root@duke ~]# docker ps
CONTAINER ID IMAGE
40b6a219a309 gcr.io/google_containers/kube-controller-manager-amd64
df792ff0788b gcr.io/google_containers/etcd-amd64
7dbe0aea0094 gcr.io/google_containers/kube-apiserver-amd64
b92729e62a30 gcr.io/google_containers/kube-scheduler-amd64
4721aea82aaf gcr.io/google_containers/pause-amd64:3.0
4e968871c287 gcr.io/google_containers/pause-amd64:3.0
8b73e804bc9e gcr.io/google_containers/pause-amd64:3.0
ca338eb3c411 gcr.io/google_containers/pause-amd64:3.0

[root@duke ~]# docker image ls
REPOSITORY TAG
gcr.io/google_containers/kube-apiserver-amd64 v1.8.5
gcr.io/google_containers/kube-controller-manager-amd64 v1.8.5
gcr.io/google_containers/kube-scheduler-amd64 v1.8.5
gcr.io/google_containers/kube-apiserver-amd64 v1.8.4
gcr.io/google_containers/kube-controller-manager-amd64 v1.8.4
gcr.io/google_containers/kube-scheduler-amd64 v1.8.4
gcr.io/google_containers/etcd-amd64 3.0.17
gcr.io/google_containers/kube-cross v1.6.2-2
gcr.io/google_containers/pause-amd64 3.0

开始装的v1.8.4,后来用v1.8.5装一遍还是一样的错误

下面是journalctl -lxeu kubelet的结果:

lector.go:205] k8s.io/kubernetes/pkg/kubelet/config/apiserver.go:47: Failed to list *v1.Pod: Get https://10.10.103.25:6443/api/v1/pods?fieldSe
lector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:413: Failed to list *v1.Service: Get https://10.10.103.25:6443/api/v1/services?resourc
lector.go:205] k8s.io/kubernetes/pkg/kubelet/kubelet.go:422: Failed to list *v1.Node: Get https://10.10.103.25:6443/api/v1/nodes?fieldSelector
elet_network.go:69] Hairpin mode set to "promiscuous-bridge" but kubenet is not enabled, falling back to "hairpin-veth"
elet.go:517] Hairpin mode set to "hairpin-veth"
.go:196] Unable to update cni config: No networks found in /etc/cni/net.d
ker_service.go:207] Docker cri networking managed by kubernetes.io/no-op
ker_service.go:212] Docker Info: &{ID:M2GM:A4RE:S2LN:BNPC:COTP:HFP7:BUVD:36LZ:65UZ:7GE6:IRJV:CYHI Containers:18 ContainersRunning:0 Containers
ker_service.go:225] Setting cgroupDriver to systemd
ote_runtime.go:43] Connecting to runtime service unix:///var/run/dockershim.sock
eruntime_manager.go:178] Container runtime docker initialized, version: 17.09.0-ce, apiVersion: 1.32.0
ver.go:718] Started kubelet v1.8.5
elet.go:1234] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to fin
ver.go:128] Starting to listen on 0.0.0.0:10250
elet_node_status.go:280] Setting node annotation to enable volume controller attach/detach
ver.go:296] Adding debug handlers to kubelet server.
nt.go:209] Unable to write event: 'Post https://10.10.103.25:6443/api/v1/namespaces/default/events: dial tcp 10.10.103.25:6443: getsockopt: co
resource_analyzer.go:66] Starting FS ResourceAnalyzer

Unable to update cni config: No networks found in /etc/cni/net.d,大概是错误原因,其他实在太长,看不懂,net.d里面空的,我百度了个被配置文件放进去,但是init后就没了- -

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

image保留着,然后执行kubeadm reset,再重新执行kubeadm init 试试

亲测v1.8.5,部署完后三节点状态都是ready,但kubectl get pods --all-namespaces现实kube-dns状态停留在 ContainerCreating,journalctl -u kubelet | grep kube-dns看到“ Error deleting network: failed to find plugin "portmap" in path [/opt/flannel/bin /opt/cni/bin]”,解决办法到https://github.com/projectcalico/cni-plugin/releases/download/v1.9.1/portmap下载portmap并放到/opt/cni/bin,加上可执行权限。。。。。。。大坑啊