apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: node-exporter
  namespace: kube-system
  labels:
    app: node-exporter
    component: node-exporter
spec:
  selector:
    matchLabels:
      app: node-exporter
      component: node-exporter
  template:
    metadata:
      name: node-exporter
      labels:
        app: node-exporter
        component: node-exporter
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: '9100'
        prometheus.io/path: /metrics
    spec:
      containers:
        - image: prom/node-exporter:v0.18.0
          name: node-exporter
          ports:
            - name: prom-node-exp
              containerPort: 9100
              hostPort: 9100
      hostNetwork: true
      hostPID: true