Scheduler 没有为 Master 节点中的 DaemonSet 调度 Pod

Scheduler is not scheduling Pod for DaemonSet in Master node

我想部署一个 DaemonSet 用于监控目的。所以这些 Pods 需要部署在所有节点中。

A DaemonSet ensures that all (or some) Nodes run a copy of a Pod.

我正在使用 DaemonSet,以便所有节点都获得一个副本。

    spec:
      containers:
      - name: fluentd
        image: aerocloud.io/containers/fluentd:0.0.1
        volumeMounts:
        - name: varlog
          mountPath: /var/log
      volumes:
      - name: varlog
        hostPath:
          path: /var/log

当我在我的 Kubernetes 集群中创建此 DaemonSet 时,我没有在我的主节点中看到 Pod 运行。

此 DaemonSet 的 Pod 在除主节点之外的所有节点中 运行。

我在这里错过了什么?如何强制调度程序在主节点中调度 Pod?

从 Kubernetes 1.6 开始,DaemonSets 默认不在主节点上调度。为了将它安排在 master 上,您必须在 Pod 规范部分添加一个容忍度:

tolerations:
- key: node-role.kubernetes.io/master
  effect: NoSchedule

有关更多详细信息,请查看 Kubernetss DeamonSet docu 中的示例 YAML 文件。 How Daemon Pods are Scheduled.

一章中也提到了它