apiVersion: v1
kind: Pod
metadata:
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ""
  labels:
    component: nvidia-device-plugin
  name: nvidia-device-plugin
  namespace: kube-system
spec:
  hostNetwork: true
  containers:
  - image: nvcr.io/nvidia/k8s-device-plugin:v0.9.0
    name: nvidia-device-plugin-ctr
    # Make this pod as Guaranteed pod which will never be evicted because of node's resource consumption.
    resources:
      limits:
        memory: "300Mi"
        cpu: "1"
      requests:
        memory: "300Mi"
        cpu: "1"
    securityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop: ["ALL"]
    volumeMounts:
      - name: device-plugin
        mountPath: /var/lib/kubelet/device-plugins
  volumes:
    - name: device-plugin
      hostPath:
        path: /var/lib/kubelet/device-plugins
