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:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM