I setup 2 k8s environments with minikube. One with the --container-runtime=docker
flag and one with --container-runtime=containerd
flag. Here are the differences I see.
When I set container-runtime=docker
, these things happen
- there is a
dockerd
service that is running - The
dockerd
service spawnscontainerd
as its own child - There are
/usr/bin/containerd-shim-runc-v2
processes that run the actual containers, and the parent of each of thesecontainerd-shim-runc-v2
is PID 1 on the system.
When I set container-runtime=containerd
, these things happen
- there is no
dockerd
service, no ambiguities there. - there is a
containerd
process, which is owned by PID 1. Again, no surprises there. - There are
containerd-shim
processes that run actual containers, and the parent of each of thesecontainerd-shim
processes iscontainerd
So here are my questions
- What are the differences between
containerd-shim
andcontainerd-shim-runc-v2
? They seem to take mostly similar flags etc. - Why in scenario 1 the shims are children of PID 1 whereas scenario 2 the shims are children of containerd ?
EDIT: Just thought of an edit. On a ubuntu 20 box, if I install docker, dockerd is a separate process whose parent is PID 1, containerd is a separate process whose parent is PID 1, and all containers are children of container-shim-runc-v2 whose PID is 1 ?!?! Why is containerd
not a child of dockerd
? Where is this configured?