kubernetes Node Not Ready & network plugin is not ready

kubernetes Node Not Ready & network plugin is not ready

问题描述

kubernetes Node Not Ready & network plugin is not ready_第1张图片
runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

问题排查

1、查看是否安装 CNI 网络查件

2、查看 CNI 网络插件pod的状态

使用kubectl查看所有pod的状态
kubectl get pods --all-namespaces

kubernetes 默认为所有Node部署 CNI插件

# 正常状态
[root@K8s-master simple_example]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                 READY   STATUS    RESTARTS   AGE
default       mysql-pvpqk                          1/1     Running   0          6h28m
kube-system   coredns-6b4b4997cc-95w7f             1/1     Running   0          5d2h
kube-system   coredns-6b4b4997cc-q2xjk             1/1     Running   0          5d2h
kube-system   etcd-k8s-master                      1/1     Running   0          5d2h
kube-system   kube-apiserver-k8s-master            1/1     Running   0          5d2h
kube-system   kube-controller-manager-k8s-master   1/1     Running   0          5d2h
kube-system   kube-proxy-2pzxd                     1/1     Running   0          5d
kube-system   kube-proxy-6kg6r                     1/1     Running   0          5d2h
kube-system   kube-proxy-bggwb                     1/1     Running   0          5d1h
kube-system   kube-proxy-hcfmc                     1/1     Running   0          5d1h
kube-system   kube-scheduler-k8s-master            1/1     Running   1          5d2h
kube-system   weave-net-64ldc                      2/2     Running   0          5d2h
kube-system   weave-net-k98rp                      2/2     Running   0          5d1h
kube-system   weave-net-w5br6                      2/2     Running   0          5d
kube-system   weave-net-wzdzx                      2/2     Running   0          5d1h

kubernetes Node Not Ready & network plugin is not ready_第2张图片
如果发现异常节点, 使用 kubectl --namespace=kube-system describe pod 查看pod的详细信息

[root@K8s-master simple_example]# kubectl --namespace=kube-system describe pod weave-net-64ldc
Name:                 weave-net-64ldc
Namespace:            kube-system
Priority:             2000001000
Priority Class Name:  system-node-critical
Node:                 k8s-master/192.168.106.132
Start Time:           Fri, 19 Jun 2020 05:24:45 -0400
Labels:               controller-revision-hash=6768fc7ccf
                      name=weave-net
                      pod-template-generation=1
Annotations:          <none>
Status:               Running
IP:                   192.168.106.132
IPs:
  IP:           192.168.106.132
Controlled By:  DaemonSet/weave-net
Containers:
  weave:
······

kubernetes Node Not Ready & network plugin is not ready_第3张图片
根据描述信息定位具体的问题并解决
由于我的服务器无法连接外网,导致节点获取获取镜像失败

问题解决

登录相应的Node, 手动下载或者导入镜像
然后重复查看当前节点是否 ready

你可能感兴趣的:(kubernetes)