Kubernetes Fluent Bit Pod Pending 问题解决方案
问题描述
Fluent Bit pod fluent-bit-5pfjh
在 amazon-cloudwatch
命名空间中处于 Pending 状态长达 9 天,无法正常调度。
根本原因分析
通过 kubectl describe pod
命令分析,发现调度失败的原因:
- CPU 资源不足:节点无法满足 pod 的 500m CPU 请求
- 节点亲和性约束:某个节点不满足 NodeAffinity 插件要求
- 集群资源紧张:2 个可用节点都存在调度限制
解决方案
1. 降低 CPU 资源请求(推荐)
kubectl patch daemonset fluent-bit -n amazon-cloudwatch -p '{"spec": {"template": {"spec": {"containers": [{"name": "fluent-bit","resources": {"requests": {