apiVersion: v1
kind: Pod
metadata:
  name: cadvisor
  labels:
    name: cadvisor
spec:
  containers:
  - name: cadvisor
    image: google/cadvisor:latest
    ports:
      - name: http
        containerPort: 8080
        hostPort: 9999
    volumeMounts:
      - name: rootfs
        mountPath: /rootfs
        readOnly: true
      - name: varrun
        mountPath: /var/run
        readOnly: false
      - name: varlibdocker
        mountPath: /var/lib/docker
        readOnly: true
      - name: sysfs
        mountPath: /sys
        readOnly: true
  volumes:
    - name: rootfs
      hostPath:
        path: /
    - name: varrun
      hostPath:
        path: /var/run
    - name: varlibdocker
      hostPath:
        path: /var/lib/docker
    - name: sysfs
      hostPath:
        path: /sys