What is the difference between Drivers and Container Runtimes in Kubernetes?

8/27/2020

I was reading about the Minikube installation process and the names Drivers and Containers Runtimes got me confused.

Drivers

When I don't choose a driver Minikube will use the Docker driver by default, thus using a Docker daemon inside Minikube itself. When I choose none it'll use the host's Docker daemon. Others can be chosen like podman, KVM, etc.

Container Runtimes

When it comes to the Container Runtime I can choose, again, Docker or others like Containerd.

My Inquire

What I couldn't find is a more detailed explanation around the differences between Drivers and Container Runtimes. Actually I know that the Runtimes exist to run container in Pods, but what about Drivers? Does the Container Runtime runs on top of the Driver?

-- Ariel Moraes
docker
kubernetes
minikube

1 Answer

8/27/2020

Drivers

  • Where do you want to run Kubernetes on top of?
    • VMs? -> Hyperkit, VirtualBox, Parallels, VMWare, etc
    • Containers? -> Docker (Ironically, this runs on VM if you are on a Mac or Windows, but not on Linux), Podman, etc.

Container Runtimes

  • When your cluster gets created how would you like it to be configured? Using what runtime or shim to instantiate its containers (and Pods)?
    • Containerd -> It's a shim that understands CRI from the kubelet and runs containers with an executable like runc (the actual runtime, that uses things like cgcreate and nsenter)
    • CRI-O -> It's another shim that understands CRI from the kubelet and just like Containerd runs containers with an executable like runc
    • Docker -> The kubelet directly talks to the Docker daemon using the dockershim that talks to Containerd, that instantiates your containers (I know it's complicated, historical reasons...)

✌️

-- Rico
Source: StackOverflow