k8s报错:Error syncing pod, skipping: failed to "StartContainer" for "kubernetes-dashboard" with CrashLoopBackOff: "Back-off 40s restarting failed ……

k8s报错:Error syncing pod, skipping: failed to "StartContainer" for "kubernetes-dashboard" with CrashLoopBackOff: "Back-off 40s restarting failed container=kubernetes-dashboard pod=kubernetes-dashboard-4242380078-1tn4m_kube-system(af42ba88-7bca-11eb-be55-000c29617d77)"

服务不可用,到master 节点上查看pod信息:

看到有如下报错

Error syncing pod, skipping: failed to "StartContainer" for "kubernetes-dashboard" with CrashLoopBackOff: "Back-off 40s restarting failed container=kubernetes-dashboard pod=kubernetes-dashboard-4242380078-1tn4m_kube-system(af42ba88-7bca-11eb-be55-000c29617d77)"

到对应的minion节点上查看是否缺少rhsm证书
yum list *rhsm*
安装:
yum install *rhsm*
重启pod:
1、到master节点删除pod,查看pod:
[root@node1 kubernetes]# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
pods/kubernetes-dashboard-4242380078-mlsk0 1/1 Running 7 14m
2、删除:
kubectl delete pods/kubernetes-dashboard-4242380078-mlsk0 -n kube-system
删除后再次访问UI仍然报错:
[root@node1 kubernetes]# etcdctl cluster-health
member 8e9e05c52164694d is healthy: got healthy result from http://192.168.10.134:2379
cluster is healthy
查看日志信息:
[root@node1 kubernetes]# kubectl logs kubernetes-dashboard-4242380078-x5g3x -n kube-system
Using HTTP port: 8443
Using apiserver-host location: http://192.168.10.134:8080
Skipping in-cluster config
Using random key for csrf signing
No request provided. Skipping authorization header
Successful initial request to the apiserver, version: v1.5.2
No request provided. Skipping authorization header
Creating in-cluster Heapster client
Could not enable metric client: Health check failed: the server could not find the requested resource (get services heapster). Continuing.
连不上minion节点,到节点上查看iptables:

修改:

再次访问UI:

posted @ 2021-03-03 14:50  丛丛丛丛  阅读(10153)  评论(0编辑  收藏  举报