|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: DaemonSet |
| 3 | +metadata: |
| 4 | + name: node-problem-detector |
| 5 | + namespace: kube-system |
| 6 | + labels: |
| 7 | + app: node-problem-detector |
| 8 | +spec: |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + app: node-problem-detector |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + labels: |
| 15 | + app: node-problem-detector |
| 16 | + spec: |
| 17 | + affinity: |
| 18 | + nodeAffinity: |
| 19 | + requiredDuringSchedulingIgnoredDuringExecution: |
| 20 | + nodeSelectorTerms: |
| 21 | + - matchExpressions: |
| 22 | + - key: kubernetes.io/os |
| 23 | + operator: In |
| 24 | + values: |
| 25 | + - linux |
| 26 | + containers: |
| 27 | + - name: node-problem-detector |
| 28 | + command: |
| 29 | + - /node-problem-detector |
| 30 | + - --logtostderr |
| 31 | + - --config.system-log-monitor=/config/kernel-monitor.json,/config/docker-monitor.json |
| 32 | + - --config.custom-plugin-monitor=/config/health-checker-kubelet.json |
| 33 | + image: k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.6 |
| 34 | + resources: |
| 35 | + limits: |
| 36 | + cpu: 10m |
| 37 | + memory: 80Mi |
| 38 | + requests: |
| 39 | + cpu: 10m |
| 40 | + memory: 80Mi |
| 41 | + imagePullPolicy: Always |
| 42 | + securityContext: |
| 43 | + privileged: true |
| 44 | + env: |
| 45 | + - name: NODE_NAME |
| 46 | + valueFrom: |
| 47 | + fieldRef: |
| 48 | + fieldPath: spec.nodeName |
| 49 | + volumeMounts: |
| 50 | + - name: log |
| 51 | + mountPath: /var/log |
| 52 | + readOnly: true |
| 53 | + - name: kmsg |
| 54 | + mountPath: /dev/kmsg |
| 55 | + readOnly: true |
| 56 | + # Make sure node problem detector is in the same timezone |
| 57 | + # with the host. |
| 58 | + - name: localtime |
| 59 | + mountPath: /etc/localtime |
| 60 | + readOnly: true |
| 61 | + - name: config |
| 62 | + mountPath: /config |
| 63 | + readOnly: true |
| 64 | + - mountPath: /etc/machine-id |
| 65 | + name: machine-id |
| 66 | + readOnly: true |
| 67 | + - mountPath: /run/systemd/system |
| 68 | + name: systemd |
| 69 | + - mountPath: /var/run/dbus/ |
| 70 | + name: dbus |
| 71 | + mountPropagation: Bidirectional |
| 72 | + volumes: |
| 73 | + - name: log |
| 74 | + # Config `log` to your system log directory |
| 75 | + hostPath: |
| 76 | + path: /var/log/ |
| 77 | + - name: kmsg |
| 78 | + hostPath: |
| 79 | + path: /dev/kmsg |
| 80 | + - name: localtime |
| 81 | + hostPath: |
| 82 | + path: /etc/localtime |
| 83 | + - name: config |
| 84 | + configMap: |
| 85 | + name: node-problem-detector-config |
| 86 | + items: |
| 87 | + - key: kernel-monitor.json |
| 88 | + path: kernel-monitor.json |
| 89 | + - key: docker-monitor.json |
| 90 | + path: docker-monitor.json |
| 91 | + - name: machine-id |
| 92 | + hostPath: |
| 93 | + path: /etc/machine-id |
| 94 | + type: "File" |
| 95 | + - name: systemd |
| 96 | + hostPath: |
| 97 | + path: /run/systemd/system/ |
| 98 | + type: "" |
| 99 | + - name: dbus |
| 100 | + hostPath: |
| 101 | + path: /var/run/dbus/ |
| 102 | + type: "" |
0 commit comments