Is there way to specify container runtime for container inside kubernetes pod?

11/23/2018

I want to have a container inside a pod, that uses some docker runtime (we can specify it using --runtime flag in pure docker).

In my case, I want to use nvidia-docker2 runtime (https://github.com/NVIDIA/nvidia-docker) for using GPU inside my containers in Kubernetes cluster.

Answer: Specify default runtime in /etc/docker/daemon.json like that:

"default-runtime": "nvidia",
"runtimes": {
    "nvidia": {
        ...
    }
}
-- Дима Меркурьев
kubernetes

2 Answers

11/23/2018

You need to use kubernetes device plugin which creates daemonset and allows you to expose the GPU metrics on each node.

https://github.com/NVIDIA/k8s-device-plugin

-- Prafull Ladha
Source: StackOverflow

11/23/2018

You want to use "nvidia-docker runtime (https://github.com/NVIDIA/nvidia-docker) for using GPU inside your containers in Kubernetes cluster", then take a look into the official docs provided by keubernetes themselves:

-- Shudipta Sharma
Source: StackOverflow