Skip to content

Instantly share code, notes, and snippets.

@egeneralov
Created June 5, 2020 10:39
Show Gist options
  • Select an option

  • Save egeneralov/f2ef08cfc60d00da83d39aaa0574656b to your computer and use it in GitHub Desktop.

Select an option

Save egeneralov/f2ef08cfc60d00da83d39aaa0574656b to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
app.kubernetes.io/name: cadvisor
app.kubernetes.io/instance: cadvisor
name: cadvisor
spec:
selector:
matchLabels:
app.kubernetes.io/instance: cadvisor
app.kubernetes.io/name: cadvisor
template:
metadata:
labels:
app.kubernetes.io/instance: cadvisor
app.kubernetes.io/name: cadvisor
annotations:
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
spec:
containers:
- env:
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
image: gcr.io/google-containers/cadvisor:v0.36.0
name: cadvisor
ports:
- containerPort: 8080
name: exporter
protocol: TCP
resources: {}
securityContext:
privileged: true
volumeMounts:
- mountPath: /rootfs
name: rootfs
readOnly: true
- mountPath: /var/run
name: varrun
readOnly: true
- mountPath: /sys
name: sys
readOnly: true
- mountPath: /var/lib/docker
name: varlibdocker
readOnly: true
- mountPath: /dev/disk
name: devdisk
readOnly: true
securityContext: {}
volumes:
- hostPath:
path: /
type: Directory
name: rootfs
- hostPath:
path: /var/run
type: Directory
name: varrun
- hostPath:
path: /sys
type: Directory
name: sys
- hostPath:
path: /var/lib/docker
type: Directory
name: varlibdocker
- hostPath:
path: /dev/disk
type: Directory
name: devdisk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment