apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: cpu-device-plugin
  namespace: default
spec:
  selector:
    matchLabels:
      name: cpu-device-plugin
  template:
    metadata:
      labels:
        name: cpu-device-plugin
    spec:
      containers:
      - name: cpu-device-plugin 
        image: cpudp
        imagePullPolicy: IfNotPresent
        command: [ "/cpu-device-plugin", "-logtostderr" ]
        volumeMounts:
         - mountPath: /etc/cpu-pooler
           name: cpu-pooler-config
         - mountPath: /var/lib/kubelet/device-plugins/ 
           name: devicesock 
           readOnly: false
        env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
      volumes:
      - name: devicesock 
        hostPath:
         # directory location on host
         path: /var/lib/kubelet/device-plugins/
      - name: cpu-pooler-config
        configMap:
          name: cpu-pooler-configmap
