Configure Docker to Manage Resources in Containerd’s k8s.io Namespace

containerddockerkubernetes

I had a Kubernetes cluster with Docker and recently migrate it to containerd, but I still want to use Docker to manage images and containers for Kubernetes because of some compatibility problems.

When using Docker as a runtime, Docker was able to load images so that Kubernetes can use it, and was able to list containers running as Kubernetes pods with docker ps command.

Even after switching to containerd, I can still run and use Docker with it. However as Docker is isolated from Kubernetes world, it's impossible to manage resources in Kubernetes using docker commands.

It seems that Kubernetes is running with containerd's namespace "k8s.io" so I hope I can configure Docker to manage resources in that namespace, is it possible?

Best Answer

I don't think you'll be able to get the Docker CLI to do that as it's not aware of containerd namespaces.

However there's a tool which provides docker CLI like features for containerd, which is nerdctl, and that could be a good option to explore for this.