1.13.2版本weave网络问题

来源:1-5 下载Kubeadm,node组件和命令行工具

Liaoxu

2019-01-11

按照老师的方法安装,但是版本是最新的1.13.2,遇到这样的问题

安装weave网络后,weave-net容器始终报错无法启动,coreDNS也无法启动

[@gd_36_210 ~]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-86c58d9df4-gpngp 0/1 Pending 0 4m47s
kube-system coredns-86c58d9df4-svf76 0/1 Pending 0 4m47s
kube-system etcd-node1 1/1 Running 0 4m15s
kube-system kube-apiserver-node1 1/1 Running 0 4m6s
kube-system kube-controller-manager-node1 1/1 Running 0 3m50s
kube-system kube-proxy-987rx 1/1 Running 0 4m47s
kube-system kube-scheduler-node1 1/1 Running 0 3m47s
kube-system weave-net-86nrd 1/2 Error 5 3m2s

查看log的话

[@gd_36_210 ~]# kubectl logs weave-net-86nrd -n kube-system
Error from server (BadRequest): a container name must be specified for pod weave-net-86nrd, choose one of: [weave weave-npc]

查看kubelet服务状态

[@gd_36_210 ~]# systemctl status kubelet.service
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Fri 2019-01-11 20:03:03 CST; 8s ago
Docs: https://kubernetes.io/docs/
Main PID: 22734 (kubelet)
Tasks: 19
Memory: 36.5M
CGroup: /system.slice/kubelet.service
└─22734 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --hostname-overr…

Jan 11 20:03:04 gd_36_210 kubelet[22734]: I0111 20:03:04.249486 22734 reconciler.go:207] operationExecutor.VerifyControllerAttachedVolume started for volume “weavedb” (UniqueName: “kubernetes.io/host-pa…-aaaaaa69c280”)
Jan 11 20:03:04 gd_36_210 kubelet[22734]: I0111 20:03:04.249523 22734 reconciler.go:207] operationExecutor.VerifyControllerAttachedVolume started for volume “cni-bin2” (UniqueName: “kubernetes.io/host-p…-aaaaaa69c280”)
Jan 11 20:03:04 gd_36_210 kubelet[22734]: I0111 20:03:04.249560 22734 reconciler.go:207] operationExecutor.VerifyControllerAttachedVolume started for volume “weave-net-token-9jvfh” (UniqueName: "kubernetes.io/secret/5
Jan 11 20:03:04 gd_36_210 kubelet[22734]: I0111 20:03:04.249592 22734 reconciler.go:207] operationExecutor.VerifyControllerAttachedVolume started for volume “ca-certs” (UniqueName: “kubernetes.io/host-p...ed998be6592ac”)
Jan 11 20:03:04 gd_36_210 kubelet[22734]: I0111 20:03:04.249626 22734 reconciler.go:207] operationExecutor.VerifyControllerAttachedVolume started for volume “etc-pki” (UniqueName: “kubernetes.io/host-pa...ed998be6592ac”)
Jan 11 20:03:04 gd_36_210 kubelet[22734]: I0111 20:03:04.249655 22734 reconciler.go:154] Reconciler: start to sync state
Jan 11 20:03:04 gd_36_210 kubelet[22734]: E0111 20:03:04.952901 22734 pod_workers.go:190] Error syncing pod 55d9539f-1598-11e9-b002-aaaaaa69c280 (“weave-net-86nrd_kube-system(55d9539f-1598-11e9-b002-aaaaaa69c280)”), s…
Jan 11 20:03:05 gd_36_210 kubelet[22734]: E0111 20:03:05.968055 22734 pod_workers.go:190] Error syncing pod 55d9539f-1598-11e9-b002-aaaaaa69c280 (“weave-net-86nrd_kube-system(55d9539f-1598-11e9-b002-aaaaaa69c280)”), s…
Jan 11 20:03:09 gd_36_210 kubelet[22734]: W0111 20:03:09.024333 22734 cni.go:203] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 11 20:03:09 gd_36_210 kubelet[22734]: E0111 20:03:09.024564 22734 kubelet.go:2192] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin…g uninitialized
Hint: Some lines were ellipsized, use -l to show in full.

请教老师可能是什么问题

写回答

1回答

tonybai

2019-01-11

应该是weave-net安装失败的问题。你kubectl describe pods/weave-net-86nrd -n kube-system看一下。

0
5
tonybai
回复
Liaoxu
不客气,祝学习愉快!
2019-01-12
共5条回复

Kubernetes实战 高可用集群搭建,配置,运维与应用

以生产为目标,原理+操作, Kubernetes结合典型云原生应用

794 学习 · 196 问题

查看课程