daemonset.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. annotations:
  18. scheduler.alpha.kubernetes.io/critical-pod: ''
  19. spec:
  20. priorityClassName: system-node-critical
  21. affinity:
  22. nodeAffinity:
  23. requiredDuringSchedulingIgnoredDuringExecution:
  24. nodeSelectorTerms:
  25. - matchExpressions:
  26. - key: cloud.google.com/gke-accelerator
  27. operator: Exists
  28. tolerations:
  29. - operator: "Exists"
  30. effect: "NoExecute"
  31. - operator: "Exists"
  32. effect: "NoSchedule"
  33. volumes:
  34. - name: device-plugin
  35. hostPath:
  36. path: /var/lib/kubelet/device-plugins
  37. - name: dev
  38. hostPath:
  39. path: /dev
  40. containers:
  41. - image: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:08509a36233c5096bb273a492251a9a5ca28558ab36d74007ca2a9d3f0b61e1d"
  42. command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"]
  43. name: nvidia-gpu-device-plugin
  44. resources:
  45. requests:
  46. cpu: 50m
  47. memory: 10Mi
  48. limits:
  49. cpu: 50m
  50. memory: 10Mi
  51. securityContext:
  52. privileged: true
  53. volumeMounts:
  54. - name: device-plugin
  55. mountPath: /device-plugin
  56. - name: dev
  57. mountPath: /dev
  58. updateStrategy:
  59. type: RollingUpdate