NVIDIA / gpu-monitoring-tools

Tools for monitoring NVIDIA GPUs on Linux
Apache License 2.0
1.01k stars 301 forks source link

Pod run as non root user #171

Closed anaconda2196 closed 3 years ago

anaconda2196 commented 3 years ago

I want to deploy dcgm-exporter pod as non-root user. In values.yaml I made below changes but pod is crashingoff!

Case 1:

securityContext:
  runAsNonRoot: true
  runAsUser: 1002
  # capabilities:
  #    add: ["SYS_ADMIN"]
  # readOnlyRootFilesystem: true
kubectl -n kube-system logs dcgm-exporter-6nwvl 
unable to set CAP_SETFCAP effective capability: Operation not permitted

Case:2

securityContext:
  runAsNonRoot: true
  #runAsUser: 1002
  # capabilities:
  #    add: ["SYS_ADMIN"]
  # readOnlyRootFilesystem: true

Error: container has runAsNonRoot and image will run as root

Is it possible to change and run as non root user or Is this a requirement for the dcgm-exporter to work as root user?