ceph-mds pod 启动失败 cpu、MatchNodeSelector、PodToleratesNodeTaints

ceph-mds pod fails to launch with Insufficient cpu, MatchNodeSelector, PodToleratesNodeTaints

我追踪到了 CPU 的用法。即使在增加节点数量后,我仍然会收到以下术语的持续调度错误:Insufficient cpu、MatchNodeSelector、PodToleratesNodeTaints.

我的提示来自this article。它提到:

Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.

配置包含以下内容。

spec:
  replicas: 1
  template:
    metadata:
      name: ceph-mds
      namespace: ceph
      labels:
        app: ceph
        daemon: mds
    spec:
      nodeSelector:
        node-type: storage
    ... and more ...

注意 node-type。我必须 kubectl label nodes node-type=storage --all 以便我可以用 node-type=storage 标记所有节点。我也可以选择只将一些节点作为存储节点。

kops edit ig nodes中,根据这个hint,可以在下面添加这个标签。

spec:
  nodeLabels:
    node-type: storage