首页/云/云与容器速查/无法调度:资源、污点与亲和性
本包目录(340 条)

无法调度:资源、污点与亲和性

FailedScheduling 事件是调度器的诊断书:资源碎片、污点、亲和、端口占用都在这里说清楚。先读事件再改 Pod,避免盲调参数。

云与容器速查云更新于 2026-10-12
资源类0/5 nodes available: insufficient cpu/memory
污点类node(s) had untolerated taint
亲和类node(s) didn't match Pod's node affinity/selector
拓扑类volume node affinity conflict:卷与节点不同区
端口类HostPort 冲突:节点上端口被占

排查命令

排查命令
kubectl describe pod web-1 | grep -A3 "FailedScheduling"
kubectl get nodes -o custom-columns=NAME:.metadata.name,CPU:.status.allocatable.cpu
kubectl describe node node-1 | grep -E "Taints|Allocated"
集群『看起来有空闲』但调度不上:requests 碎片化所致——调度按单节点余量而非总和计算。

易错点

  • events 里 unschedulable 只看到一条就放弃:要看完整 message 的多行细节
  • 把 requests 调小『骗过』调度:运行期内存超卖,节点压力更危险

数据来源与参考

  • Kubernetes Docs:Scheduling
  • Kubernetes Docs:Taints and Tolerations

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌