[英]Unschedulable GPU workload on GKE from node pool
我正在 GKE Standard 上按需运行 GPU 密集型工作负载,其中我创建了具有最小 0 和最大 5 个节点的适当节点池。 但是,当在节点池上调度 Job 时,GKE 会出现以下错误:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 59s (x2 over 60s) default-scheduler 0/1 nodes are available: 1 node(s) didn't match Pod's node affinity/selector.
Normal NotTriggerScaleUp 58s cluster-autoscaler pod didn't trigger scale-up: 1 node(s) had taint {nvidia.com/gpu: present}, that the pod didn't tolerate, 1 in backoff after failed scale-up
我已经根据文档设置了 nodeSelector 并启用了自动缩放,我可以确认它确实找到了节点池,尽管出现“与 Pod 的节点关联/选择器不匹配”的错误并尝试扩展集群。 但是此后不久它就失败了,说 0/1 节点可用? 这是完全错误的,看到节点池中使用了 0/5 个节点。 我在这里做错了什么?
对于node(s) didn't match Pod's node
,您不共享清单文件的详细信息,但假设他有以下行:
nodeSelector:
nodePool: cluster
您可以选择从 YAML 文件中删除这些行。 或者,另一种选择是将nodePool: cluster
作为 label 添加到所有节点,然后将使用可用的选择器来调度 pod。 以下命令可能对您有用:
kubectl label nodes <your node name> nodePool=cluster
关于1 node(s) had taint {nvidia.com/gpu: present}, that the pod didn't tolerate
消息,您可以按照@gohm'c 的建议进行操作,或者您也可以按顺序使用以下命令要从主节点中删除taint
,您应该能够在该节点上安排您的 pod:
kubectl taint nodes <your node name> node-role.kubernetes.io/master-
kubectl taint nodes <your node name> node-role.kubernetes.io/master-
您可以使用以下线程作为参考,它们具有来自真实案例的信息, Error: FailedScheduling: nodes didn't match node selector and Node has taints that the pod didn't容忍错误。
1 node(s) had taint {nvidia.com/gpu: present}, that the pod didn't tolerate...
尝试在您的工作的 pod 规范中添加tolerations
:
...
spec:
containers:
- name: ...
...
tolerations:
- key: nvidia.com/gpu
value: present
operator: Exists
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.