<p>What does it mean that Kubernetes removed support for Docker but supports containerd. Docker developed containerd and uses it for managing containers.</p>
<p>Are there 2 different containerd?</p>
<ol>
<li>one that is supported by kubernetes</li>
<li>another one which is used by docker</li>
</ol>
<p>If not, then why kubernetes cannot talk/use to containerd used by the Docker daemon?</p>

<h2>In short</h2>
<ul>
<li><a href="https://containerd.io/" rel="nofollow noreferrer">containerd</a> is part of Docker (the part that pulls and runs images)</li>
<li>Since Kubernetes is concerned only with pulling and running images and not creating them, it makes little sense to support Docker (which does not implement <a href="https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/" rel="nofollow noreferrer">CRI</a>) as a runtime, when containerd (which implements CRI) is the only thing that is needed</li>
<li>Even though Kubernetes drops support for Docker as a container runtime, images created with docker will still work in Kubernetes since they follow the <a href="https://github.com/opencontainers/runtime-spec/blob/master/spec.md" rel="nofollow noreferrer">OCI-spec</a>.</li>
</ul>
<blockquote>
<p>Docker as an underlying runtime is being deprecated in favor of
runtimes that use the Container Runtime Interface (CRI) created for
Kubernetes. Docker-produced images will continue to work in your
cluster with all runtimes, as they always have.</p>
</blockquote>
<h2>The longer answer</h2>
<p><strong>containerd is a container runtime, which is a piece of software that pulls images, manages networking, storage and starts containers</strong> (using <a href="https://github.com/opencontainers/runc" rel="nofollow noreferrer">runc</a>). There are other container runtimes, such as <a href="https://cri-o.io/" rel="nofollow noreferrer">cri-o</a> that can be used for this purpose also. Those container runtime can handle any image following the OCI-spec, which is a specification of the container image format.</p>
<p><strong>Docker on the other hand is much more than that</strong>. It is a multi-competent tool that can both create OCI compliant images as well as running them. When Docker pulls or runs an image it uses containerd.</p>
<p>Kubernetes relies heavily on a plugin architecture where various needs like storage, networking etc can be fullfilled by any implementation that adheres to the interface Kubernetes specifies. For container runtimes, <strong>Kubernetes defines the Container Runtime Interface CRI, and any container runtime that implements that interface can be used to pull images and launch containers in Kubernetes</strong>.</p>
<p>The extra features, like creating images etc that comes with Docker has little to no value for Kubernetes, which is concerned with pulling images and running containers only. <strong>The fact that Docker does not implement CRI makes it unneccessary complex for Kubernetes to support Docker as a runtime</strong>, when all it needs is the containerd runtime.</p>
<blockquote>
<p>[...]</p>
<p>Docker is cool and useful because it has a lot of UX enhancements
that make it really easy for humans</p>
<p>[...]</p>
<p>As a result of this human-friendly abstraction layer, your Kubernetes
cluster has to use another tool called Dockershim to get at what it
really needs, which is containerd. That’s not great, because it gives
us another thing that has to be maintained and can possibly break.
What’s actually happening here is that Dockershim is being removed
from Kubelet as early as v1.23 release, which removes support for
Docker as a container runtime as a result. You might be thinking to
yourself, but if containerd is included in the Docker stack, why does
Kubernetes need the Dockershim?</p>
<p>Docker isn’t compliant with CRI, the Container Runtime Interface. If
it were, we wouldn’t need the shim, and this wouldn’t be a thing</p>
</blockquote>
<p>Quotes are taken from the article <a href="https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/" rel="nofollow noreferrer">Don't Panic: Kubernetes and Docker</a></p>
