因podAffinity不满足,Pod无法调度至指定节点问题排查
问题:MinIO租户Pod在K3S集群节点上调度失败
环境与问题
3节点嵌入式etcd高可用K3S集群,通过MinIO Operator部署自托管MinIO租户(每个节点部署1个带3块磁盘的Pod)。此前多次部署均正常,但近期k3s-node2上的Pod始终处于Pending状态,其余节点Pod部署成功。
已排查信息
- 集群节点均无污点:
[root@k3s-node1 minIO]# kubectl describe nodes | grep Taints Taints: <none> Taints: <none> Taints: <none> - 待调度Pod的亲和性配置:
spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: v1.min.io/tenant operator: In values: - <my tenant name> - key: v1.min.io/pool operator: In values: - pool-1 topologyKey: kubernetes.io/hostname - k3s-node2的CPU、内存和磁盘资源充足,但Pod描述显示调度错误:
status: conditions: - lastProbeTime: null lastTransitionTime: "2023-03-20T05:08:11Z" message: '0/3 nodes are available: 3 node(s) didn''t satisfy existing pods anti-affinity rules. preemption: 0/3 nodes are available: 3 No preemption victims found for incoming pod.' reason: Unschedulable status: "False" type: PodScheduled phase: Pending qosClass: BestEffort
已尝试的操作
- 每次部署前删除整个命名空间,通过命令确认无重复Pod
- 重新安装k3s-node2和k3s-node3为agent角色并添加worker标签,问题仍存在
- 最终删除所有命名空间、排空节点并全集群重装K3S后,Pod可正常调度,但未知具体原因
内容的提问来源于stack exchange,提问作者John Kim
相关产品推荐
相关产品推荐

