Kubernetes | Containers - Container D and Docker
ctr | nerctl | crictl
What are these cli tools and which one should you be using.
Kubernetes Introduced something called Container run time interface - CRI
CRI Allowed any vendor to work as a container run time from kubernetes as long as they followed the standard as long as they adhered to the OCI standards.
OCI : Stands for Open Container Initiative
It consists of a image spec and a run time spec
Image Spec : Is how an image should be built
Runtime Spec : specified how a run time should be developed
Keeping these standards in mind any one can build a run time . Therefore RKT and Container run time adhered to the OCI standards and were then supported as container run time for kubernetes via the CRI
However Docker wasnt build to support the CRI standards . Docker was build way before CRI was introduced and Docker still was the dominant container tool used by most so Kubernetes had to continue to support docker as well . Therefore kubernetes introduced what is know as Dockershrim
A temporary way to continue to support Docker outside of the container run time interface
Docker isnt just a container run time alone . Docker consists of multiple tools that are put together for example.
Also the container run time called Run C and the deamon that control the run time was called Container D . The container D is CRI compatible and can work directly with kubernetes as all other run times.
Container D can be used as a runtime own its own seperate from Docker.
Kubernetes 1.24V they removed Dockershrim completely as it was an unneccesary overhead.
All the image build before by Docker all follow image spec -- image standard and it continued to work. But Docker itself was removed as a sperate run time from kubernetes.
Container D though is a part of Docker it is seperate project own its own.
Once you install Container D it comes with a tool called ctr and this tool is solely made for debugging container -D and is not a very user friendly and only supports a limited feature.
The ctr command can be used for performing basic container related tasks such as pull images
ctr is not recommended for production environment so the better alternative that is recommended is "nerdctl" tool or nerdctltool
So the nerdctl tool is a command line tool. nerdctl tool is very similar to docker . It supports almost all of the features that Docker supports.
You can simply replace docker with nerdctl s you can work with all commands of Docker.
crictl is a debugging tool and cannot be used as effectively as Docker or nerdctl tools.
Comments
Post a Comment