Pod 起不来但没有任何日志,因为容器根本没创建。看调度器怎么说。
kubectl describe pod 名字 | tail -20
0/3 nodes are available: insufficient cpu
节点资源不够。requests 设太大,或者节点上已有 Pod 占满。看节点余量:
kubectl describe node 节点名 | grep -A5 "Allocated resources"
node(s) had taint, that the pod did not tolerate
节点有污点。master 节点默认有 NoSchedule,普通 Pod 调度不上去。要么加 toleration,要么去掉污点。
node(s) didn't match Pod's node affinity
nodeSelector 或者 affinity 写死了标签,节点没有这个标签。
kubectl get nodes --show-labels
pod has unbound immediate PersistentVolumeClaims
PVC 没绑上,Pod 不会调度。先解决 PVC,这个和存储有关。
没有可用节点
所有节点 NotReady,或者被 cordon 了。kubectl get nodes 一看就知道。