1. 在master查看nodes

Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

2. 查看所有pod的信息, 注意, 是所有namespace的

kubectl get pod --all-namespaces
会发现有两个coredns-576cbf47c7- 是ContainerCreating 状态的.
Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

3. 查看任意一个coredns pod

  • a. 截图
    Kubernetes环境搭建 之 FAQ for Nodes显示NotReady
  • b. Event
    在Event中, 有这么一样,
    network is not ready: [runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized]

4. master解决方案

5. 解决node的网络问题,

a. 在node上查看docker状态,发现有一个exited的.

Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

b. 检查这个docker 容器的日志

发现有这么一行错误,
cp: can’t create ‘/etc/cni/net.d/10-flannel.conflist’: Permission denied
Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

c. 解决,

  • i. 参考https://github.com/coreos/flannel/issues/709, 上面说是由于"Selinux was enabled."
    Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

  • ii. 查看/etc/selinux/config文件
    发现SELINUX=enforcing
    Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

  • iii. 更改SELINUX=disabled
    Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

  • iv. 重启reboot

    • 1). 启动docker服务,并开始等待
      Kubernetes环境搭建 之 FAQ for Nodes显示NotReady
    • 2). 重启kubelet
      Kubernetes环境搭建 之 FAQ for Nodes显示NotReady
    • 3). 再次查看docker 容器
      Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

d. 再次在master检查node

Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

e. 再次检查node上的docker容器,

发现tomcat已经部署在node上了
Kubernetes环境搭建 之 FAQ for Nodes显示NotReady

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-02-07
  • 2021-11-28
  • 2022-01-14
  • 2021-08-31
猜你喜欢
  • 2021-10-16
  • 2021-06-30
  • 2021-06-22
  • 2021-12-20
  • 2021-12-02
  • 2022-12-23
  • 2021-08-10
相关资源
相似解决方案