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
dockerdservice that is running - The
dockerdservice spawnscontainerdas its own child - There are
/usr/bin/containerd-shim-runc-v2processes that run the actual containers, and the parent of each of thesecontainerd-shim-runc-v2is PID 1 on the system.
When I set container-runtime=containerd, these things happen
- there is no
dockerdservice, no ambiguities there. - there is a
containerdprocess, which is owned by PID 1. Again, no surprises there. - There are
containerd-shimprocesses that run actual containers, and the parent of each of thesecontainerd-shimprocesses iscontainerd
So here are my questions
- What are the differences between
containerd-shimandcontainerd-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?