Kris Raney
Kris Raney

Reputation: 23

How do I give a container access to a device file in kubernetes?

Or to put it another way, what can I do in kubernetes so that the container is run with the equivalent of --device=/dev/tty10, as an example. Otherwise accessing a device like that gives an error.

[root@87eb47e75ed4 /]# echo foo >> /dev/tty10
bash: /dev/tty10: Operation not permitted

I haven't found a way currently to achieve this short of making the container privileged. I was hoping there'd be something settable in the securityContext, perhaps.

Upvotes: 2

Views: 2151

Answers (1)

pwittrock
pwittrock

Reputation: 61

Passing the devices to the container is not currently supported in Kubernetes. This issue is tracked in https://github.com/kubernetes/kubernetes/issues/5607

Upvotes: 1

Related Questions