daemonset.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: nvidia-gpu-device-plugin
  5. namespace: kube-system
  6. labels:
  7. k8s-app: nvidia-gpu-device-plugin
  8. addonmanager.kubernetes.io/mode: Reconcile
  9. spec:
  10. selector:
  11. matchLabels:
  12. k8s-app: nvidia-gpu-device-plugin
  13. template:
  14. metadata:
  15. labels:
  16. k8s-app: nvidia-gpu-device-plugin
  17. spec:
  18. priorityClassName: system-node-critical
  19. affinity:
  20. nodeAffinity:
  21. requiredDuringSchedulingIgnoredDuringExecution:
  22. nodeSelectorTerms:
  23. - matchExpressions:
  24. - key: cloud.google.com/gke-accelerator
  25. operator: Exists
  26. tolerations:
  27. - operator: "Exists"
  28. effect: "NoExecute"
  29. - operator: "Exists"
  30. effect: "NoSchedule"
  31. volumes:
  32. - name: device-plugin
  33. hostPath:
  34. path: /var/lib/kubelet/device-plugins
  35. - name: dev
  36. hostPath:
  37. path: /dev
  38. containers:
  39. - image: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:4b036e8844920336fa48f36edeb7d4398f426d6a934ba022848deed2edbf09aa"
  40. command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"]
  41. name: nvidia-gpu-device-plugin
  42. resources:
  43. requests:
  44. cpu: 50m
  45. memory: 10Mi
  46. limits:
  47. cpu: 50m
  48. memory: 10Mi
  49. securityContext:
  50. privileged: true
  51. volumeMounts:
  52. - name: device-plugin
  53. mountPath: /device-plugin
  54. - name: dev
  55. mountPath: /dev
  56. updateStrategy:
  57. type: RollingUpdate