Skip to content

Instantly share code, notes, and snippets.

@ejhsu
Created January 9, 2019 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejhsu/e55abf2a189e10e4a411b0b75fd7a911 to your computer and use it in GitHub Desktop.
Save ejhsu/e55abf2a189e10e4a411b0b75fd7a911 to your computer and use it in GitHub Desktop.
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: node-exporter
namespace: monitoring
spec:
selector:
matchLabels:
daemon: node-exporter
grafanak8sapp: "true"
template:
metadata:
name: node-exporter
labels:
daemon: node-exporter
grafanak8sapp: "true"
spec:
volumes:
- name: proc
hostPath:
path: /proc
- name: sys
hostPath:
path: /sys
containers:
- name: node-exporter
image: quay.io/prometheus/node-exporter:v0.15.0
args:
- --path.procfs=/proc_host
- --path.sysfs=/host_sys
ports:
- name: node-exporter
hostPort: 9100
containerPort: 9100
volumeMounts:
- name: sys
readOnly: true
mountPath: /host_sys
- name: proc
readOnly: true
mountPath: /proc_host
imagePullPolicy: IfNotPresent
restartPolicy: Always
hostNetwork: true
hostPID: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment