K8S Pod 一直处于 Pending 状态
有几个原因可以阻止 Pod 运行,但我们将描述三个主要问题:
[root@k8smaster ~]# kubectl describe pod
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 12h default-scheduler 0/3 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 2 Insufficient cpu.
Warning FailedScheduling 10m default-scheduler 0/3 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 2 Insufficient cpu.
# 调小配置
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 200m
memory: 10Mi