apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: node-exporter
  namespace: kube-system
  labels:
    app: node-exporter
spec:
  selector:
    matchLabels:
      name: node-exporter
  template:
    metadata:
      labels:
        name: node-exporter
    spec:
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      containers:
      - name: node-exporter
        image: quay.io/prometheus/node-exporter:latest
        ports:
        - containerPort: 9100
          protocol: TCP
        securityContext:
          privileged: true
        args:
          - --path.rootfs=/host
        volumeMounts:
          - name: rootfs
            mountPath: /host
      volumes:
        - name: rootfs
          emptyDir: {}
