查询一下pod信息:
kubectl get pods -n kubernetes-dashboard

根据name查看详细信息:
kubectl describe pod dashboard-metrics-scraper-5b59d4bc6b-rxgqb  -n  kubernetes-dashboard

 这一句提示:
Warning  FailedScheduling  7s (x21464 over 17h)  default-scheduler  0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.
警告失败调度7s(x21464超过17h)默认调度程序0/1个节点可用:1个节点有pod无法容忍的污点。
是因为默认kubernetes默认不让pod部署到master节点,而我们部署的测试环境只有一个节点也是master节点,需要允许master节点部署pod:
首先要找到污点信息:
kubectl get no -o yaml | grep taint -A 5
注意下方返回的这个key值,清除污点的时候需要用到。
    taints:
    - effect: NoSchedule
      key: node.kubernetes.io/not-ready
    - effect: NoExecute
      key: node.kubernetes.io/not-ready
      timeAdded: "2023-05-16T08:06:27Z"

 解决方案:手动删除master的污点;
 先看一下taint命令的语法格式:
 kubectl taint nodes --all 【key】-
 这个key就是上面查询信息拿到的那个key。
kubectl taint nodes --all  node.kubernetes.io/not-ready-

 再次检查是否还有污点:
kubectl get no -o yaml | grep taint -A 5




















