apiVersion: apps/v1 kind: DaemonSet metadata: name: node-exporter namespace: monitoring labels: app.kubernetes.io/name: node-exporter spec: selector: matchLabels: app.kubernetes.io/name: node-exporter template: metadata: labels: app.kubernetes.io/name: node-exporter annotations: prometheus.io/scrape: "true" prometheus.io/port: "9100" prometheus.io/path: /metrics spec: hostNetwork: true hostPID: true tolerations: - operator: Exists containers: - name: node-exporter image: quay.io/prometheus/node-exporter:v1.8.2 args: - --path.procfs=/host/proc - --path.sysfs=/host/sys - --path.rootfs=/host/root - --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/) - --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ - --web.listen-address=0.0.0.0:9100 ports: - name: metrics containerPort: 9100 hostPort: 9100 protocol: TCP resources: requests: cpu: 50m memory: 32Mi limits: memory: 128Mi securityContext: runAsNonRoot: true runAsUser: 65534 allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: ["ALL"] volumeMounts: - name: proc mountPath: /host/proc readOnly: true - name: sys mountPath: /host/sys readOnly: true - name: root mountPath: /host/root mountPropagation: HostToContainer readOnly: true volumes: - name: proc hostPath: path: /proc - name: sys hostPath: path: /sys - name: root hostPath: path: /