apiVersion: apps/v1
kind: Deployment 
metadata:
  name: telegraf-depl
  labels:
    app: telegraf
spec:
  selector:
     matchLabels:
       app: telegraf
  template:
    metadata:
      labels:
        app: telegraf
    spec:
      containers:
      - name: telegraf
        image: my_telegraf
        imagePullPolicy: Never
        volumeMounts:
            - name: docker-socket
              mountPath: /var/run/docker.sock
        ports:
          - containerPort: 8086
      volumes:
      - name: docker-socket
        hostPath:
            path: /var/run/docker.sock
            type: Socket 
