December 04, 2020
Kubernetes is deprecating Docker support and how should you prepare for it?
In the DevOps community Docker is considered as a backbone when it comes to virtualization and since the inception of Kubernetes in the DevOps community Docker has been the preferred choice by the developer community. So Docker being adopted widely by the developer(real human being) as well as Kubernetes(not a real human being).
1. Why kubernetes deprecating the Docker?
As we know Kubernetes runs a container inside the kubernetes cluster but to interact with container
kubelet has to use
dockershim which internally communicate with
docker and then
containerd and finally
Kubernetes flow with Docker
Here you can see
Kubernetes has to deal with
docker first before it can actually access
Kubernetes flow after deprecating Docker
docker Kubernetes need not worry about
docker, it can directly interact with
cri-containerd. But we need to build container images which support CRI-OOpen container Initiative or Containerd
You can see the difference in the flow when Kubernetes is using
Docker, it has to maintain overhead of
dockershim which is entirely built for supporting UX aspects of the docker and it is really useful for the developers(real human being), not Kubernetes.
The Answer is - YES
How to safeguard?
To safeguard from Docker deprecation you need to make sure that
kubernetes nodes are using the supported container(CRI-OOpen container Initiative or Containerd) runtime otherwise it will be troublesome in the later stages.
Other than that if you have node customizations then you need to work with your cloud service provider to update the environment as well as runtime.
3. What is being planned in Kubernetes Upcoming release?
v1.20.0 - Once you upgarde to v1.20.0 then you will get deprecation warning.
4. Would this deprecation break other functionalities?
This is a little diabolical because you need to be watchful for -
- Supporting scripts - All the scripts which are heavily relying on Docker will break, so you need to take care of the scripting.
- kube-imagepuller - If you are using the kube-imagepuller then this update would be a nightmare for you because it is gonna break a lot, so be mindful about it. It is highly recommended to get rid of it before its too late.
- Plugins - Any Kubernetes plugin which requires
docker CLIwill not work anymore
- docker CLI - Any scripts which are using
docker CLIdirectly or indirectly will not work.
- Node provisioning - Any Node provisioning scripts which uses docker or docker socket will not work
5. What container tool should I use going forward?
Going forward it advisable to use following container tools -