请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

pod的status 不正常

老师,您好。
我查看pod,发现有不正常的状态。

[root@mysql-01 ~]# kubectl get pod -A
NAMESPACE     NAME                             READY   STATUS                  RESTARTS           AGE
kube-system   coredns-6d8c4cb4d-29cd4          1/1     Running                 21 (40h ago)       13d
kube-system   coredns-6d8c4cb4d-wsfgk          1/1     Running                 22 (40h ago)       13d
kube-system   etcd-master                      1/1     Running                 9 (40h ago)        13d
kube-system   kube-apiserver-master            1/1     Running                 12 (40h ago)       13d
kube-system   kube-controller-manager-master   1/1     Running                 29 (40h ago)       13d
kube-system   kube-flannel-ds-5g622            0/1     Init:Error              3612 (5m23s ago)   12d
kube-system   kube-flannel-ds-6q72m            1/1     Running                 10 (40h ago)       13d
kube-system   kube-flannel-ds-rh8zh            0/1     Init:CrashLoopBackOff   57 (12d ago)       12d
kube-system   kube-proxy-kprv5                 1/1     Running                 0                  12d
kube-system   kube-proxy-sv9g5                 1/1     Running                 8 (40h ago)        13d
kube-system   kube-proxy-twlg8                 1/1     Running                 0                  12d
kube-system   kube-scheduler-master            1/1     Running                 30 (40h ago)       13d
test          busybox                          0/1     Pending                 0                  17h
test          nginx                            0/1     Pending                 0                  25h

其中网络插件不知道为什么有三个

kube-system   kube-flannel-ds-5g622            0/1     Init:Error              3612 (5m23s ago)   12d
kube-system   kube-flannel-ds-6q72m            1/1     Running                 10 (40h ago)       13d
kube-system   kube-flannel-ds-rh8zh            0/1     Init:CrashLoopBackOff   57 (12d ago)       12d

另外test的命名空间下的两个也有问题

test          busybox                          0/1     Pending                 0                  17h
test          nginx                            0/1     Pending                 0                  25h

用kubectl describe nodes命令查看,有以下错误信息。

Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Sun, 20 Aug 2023 15:10:05 +0800   Sun, 20 Aug 2023 12:31:32 +0800   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Sun, 20 Aug 2023 15:10:05 +0800   Sun, 20 Aug 2023 12:31:32 +0800   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Sun, 20 Aug 2023 15:10:05 +0800   Sun, 20 Aug 2023 12:31:32 +0800   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Sun, 20 Aug 2023 15:10:05 +0800   Sun, 20 Aug 2023 12:31:32 +0800   KubeletNotReady              container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

老师能帮忙看下问题吗

正在回答 回答被采纳积分+3

1回答

暮闲 2023-08-20 16:34:14

同学你好 从日志来看 有两个节点的flannel没有运行 导致后面部署的服务无法运行。

---分割线---

同学你这边在给我贴一下报错的flannel pod的日志看看,命令:kubectl logs --tail 100 <your_pod_name> -n <your_namespace>

0 回复 有任何疑惑可以回复我~
  • 提问者 慕后端4419857 #1
    老师,您好。
    我分别在两个从节点执行了以下命令:
    scp mysql-01:/etc/cni/net.d/* /etc/cni/net.d/
    scp mysql-01:/run/flannel/subnet.env /run/flannel/
    之后状态都正常了
    回复 有任何疑惑可以回复我~ 2023-08-20 21:17:56
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信