{"id":199705,"date":"2021-03-11T17:00:11","date_gmt":"2021-03-11T14:00:11","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/"},"modified":"2021-03-11T17:00:11","modified_gmt":"2021-03-11T14:00:11","slug":"what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/","title":{"rendered":"#What Is containerd, And How Does It Relate to Docker and Kubernetes? \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2c16ab916a8\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2c16ab916a8\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#The_Beginnings\" >The Beginnings<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#The_Rise_of_Containerd\" >The Rise of Containerd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#Understanding_Containerds_Role\" >Understanding Containerd\u2019s Role<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#The_OCI\" >The OCI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#What_About_My_Docker_Images\" >What About My Docker Images?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#Kubernetes_and_Docker\" >Kubernetes and Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes-cloudsavvy-it\/#Its_All_Too_Confusing\" >It\u2019s All Too Confusing!<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#What Is containerd, And How Does It Relate to Docker and Kubernetes? \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10076\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/210d2ba87928d47640e3439d45fe89e4\/p\/uploads\/2021\/03\/620c8dee.jpg\" alt=\"Illustration showing the Docker and Kubernetes logos\" width=\"1602\" height=\"902\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Containers still mean \u201cDocker\u201d to many people. Docker popularised the modern use of containers in software development and deployment. These days, other technologies are around too. Here\u2019s how Containerd, Docker and Kubernetes relate to each other.<\/p>\n<h2 id=\"the-beginnings\"><span class=\"ez-toc-section\" id=\"The_Beginnings\"><\/span>The Beginnings<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>At its <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.infoq.com\/news\/2013\/03\/Docker\">release in 2013<\/a>, Docker was a self-contained project with everything you needed to build and run containers. What it lacked was an easy way to orchestrate container deployments in the cloud.<\/p>\n<p>By the end of 2013, a group of Googlers were already <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/kubernetes.io\/blog\/2018\/07\/20\/the-history-of-kubernetes-the-community-behind-it\">addressing this<\/a> with a prototype of what would become Kubernetes. Kubernetes is intended to simplify the operation of containerised workloads across large fleets of machines.<\/p>\n<p>Back in those early days, Kubernetes was inextricably linked to Docker. It used Docker directly to interact with containers, even though it only needed a subset of functionality \u2013 the parts responsible for actually running containers.<\/p>\n<p>Docker\u2019s developer-centric UI got in the way of Kubernetes. It had to bypass the human-friendly aspects of the project using a dedicated tool, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/kubernetes.io\/blog\/2020\/12\/02\/dockershim-faq\">Dockershim<\/a>. The issues were compounded by the differing directions in which Docker and Kubernetes were headed. Docker launched Swarm, its own Kubernetes alternative, offering orchestration as a built-in <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.docker.com\/engine\/swarm\">Docker \u201cmode\u201d<\/a>.<\/p>\n<h2 id=\"the-rise-of-containerd\"><span class=\"ez-toc-section\" id=\"The_Rise_of_Containerd\"><\/span>The Rise of Containerd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>As Kubernetes grew and more third-party tools arose around Docker, the limitations of its architecture became clear. At the same time, the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/opencontainers.org\">Open Container Initiative (OCI)<\/a> began standardising container formats and runtimes. This resulted in an OCI specification defining a container which could be used by multiple runtimes, of which Docker is an example.<\/p>\n<p>Docker then extracted its container runtime out into a new project, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/containerd.io\">containerd<\/a>. This includes Docker\u2019s functionality for executing containers, handling low-level storage and managing image transfers. Containerd was donated to the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/containerd.io\">Cloud Native Computing Foundation<\/a> (CNCF) in order to provide the container community with a basis for creating new container solutions.<\/p>\n<p>The emergence of containerd makes it easier for projects like Kubernetes to access the low-level \u201cDocker\u201d elements they need. Instead of actually using Docker, they now have a more accessible interface to the container runtime. The OCI standardisation of container technologies means other runtimes can be used too.<\/p>\n<h2 id=\"understanding-containerds-role\"><span class=\"ez-toc-section\" id=\"Understanding_Containerds_Role\"><\/span>Understanding Containerd\u2019s Role<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To fully understand containerd, it\u2019s necessary to look at the nature of containers. Containers are really an abstraction over various Linux kernel features. In order to run a container, you need to use syscalls to set up the containerised environment. The steps vary by platform and distribution.<\/p>\n<p>Containerd drops in to abstract this low-level wiring. It\u2019s intended <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.docker.com\/blog\/what-is-containerd-runtime\">as a \u201cclient layer\u201d<\/a> that container software then builds atop of. This might be developer-oriented software, like Docker, or cloud-oriented devops tools such as Kubernetes.<\/p>\n<p>Previously, Kubernetes development was left with two bad options: keep writing shims around the hefty Docker interface, or start interacting with Linux kernel features directly. By breaking containerd out of Docker, a third alternative became available: use containerd as a system abstraction layer, without involving Docker.<\/p>\n<p>Here\u2019s a summary of how the three technologies combine:<\/p>\n<ul>\n<li><strong>Docker<\/strong> \u2013 A developer-oriented software with a high level interface that lets you easily build and run containers from your terminal. It now uses containerd as its container runtime.<\/li>\n<li><strong>Containerd<\/strong> \u2013 An abstraction of kernel features that provides a relatively high level container interface. Other software projects can use this to run containers and manage container images.<\/li>\n<li><strong>Kubernetes<\/strong> \u2013 A container orchestrator that works with multiple container runtimes, including containerd. Kubernetes is focused on deploying containers in aggregate across one or more physical \u201cnodes.\u201d Historically, Kubernetes was tied to Docker.<\/li>\n<\/ul>\n<p>Containerd is only one container backend. Other containers implementing the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/opencontainers\/runtime-spec\">Open Containers Runtime specification<\/a> include <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.docker.com\/blog\/runc\">runC<\/a> and <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/cri-o.io\">CRI-O<\/a>. These runtimes can also be used with Docker and Kubernetes; each has its own distinctions.<\/p>\n<h2 id=\"the-oci\"><span class=\"ez-toc-section\" id=\"The_OCI\"><\/span>The OCI<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The OCI is the body responsible for defining <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/opencontainers.org\/about\/overview\">container standards<\/a>. Its work has been instrumental in facilitating the interoperability between different component technologies.<\/p>\n<p>The OCI\u2019s image specification defines what a container should look like. The runtime specification sets out an interface for running containers. Projects like containerd then implement these specifications.<\/p>\n<p>Importantly, one of the OCI\u2019s priorities is to support the container usage experience popularised by Docker. Its images must be executable on the target platform without any user-defined arguments (e.g.\u00a0<code>docker run hello-world:latest<\/code>). OCI images must therefore contain sufficient metadata to enable this automatic configuration.<\/p>\n<p>You may also see references to the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/kubernetes.io\/blog\/2016\/12\/container-runtime-interface-cri-in-kubernetes\">Container Runtime Interface<\/a> (CRI). This is a Kubernetes-specific abstraction over the OCI specification. The CRI builds on the OCI specs to enable support for interchangeable container runtimes within Kubernetes.<\/p>\n<h2 id=\"what-about-my-docker-images\"><span class=\"ez-toc-section\" id=\"What_About_My_Docker_Images\"><\/span>What About My Docker Images?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Images you build with Docker aren\u2019t really \u201cDocker images\u201d at all. As Docker now uses the containerd runtime, your images are built in the standardised Open Container Initiative (OCI) format.<\/p>\n<p>You shouldn\u2019t need to worry about incompatibilities between your Docker images and the environment they\u2019re used in. Images you build with Docker can still be deployed using Kubernetes. This is because Kubernetes also supports OCI images, through its use of containerd (and other standards-compliant runtimes). It\u2019s up to the <em>runtime<\/em> to handle the pulling and running of images, not the high level interface which tools like Docker and Kubernetes provide.<\/p>\n<h2 id=\"kubernetes-and-docker\"><span class=\"ez-toc-section\" id=\"Kubernetes_and_Docker\"><\/span>Kubernetes and Docker<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Kubernetes deprecated the Docker runtime in late 2020. It <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/kubernetes\/kubernetes\/blob\/master\/CHANGELOG\/CHANGELOG-1.20.md#deprecation\">will be removed<\/a> in a future release, currently scheduled for late 2021. After that, Kubernetes will no longer offer Docker <em>runtime<\/em> support. An alternative runtime compatible with the OCI specs, such as containerd, will need to be used instead.<\/p>\n<p>This announcement prompted concern about the implications for developers. The change shouldn\u2019t impact most existing workflows. As we\u2019ve already seen, Docker produces OCI-compliant images which OCI-compliant runtimes can run. Any images you build with <code>docker build<\/code> will still work within Kubernetes, even after the Docker runtime is removed.<\/p>\n<p>Two different technologies are being considered \u2013 the Docker <em>command-line interface<\/em> used to create and run containers, and the Docker <em>runtime<\/em> which the command-line interface wraps around.<\/p>\n<h2 id=\"its-all-too-confusing\"><span class=\"ez-toc-section\" id=\"Its_All_Too_Confusing\"><\/span>It\u2019s All Too Confusing!<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In just a few short years, containers have transformed how many developers work. The expansion in the surrounding ecosystem has been a natural byproduct of this shift. The <code>Containers === Docker<\/code> mentality proved to be too stifling as it prevented tools like Kubernetes from showing their full potential.<\/p>\n<p>The move towards standardisation has resulted in a plethora of new terms, tools and technologies. Nonetheless, nothing has really changed for developers, whether you\u2019re interacting with the Docker CLI on your machine or a Kubernetes cluster in the cloud.<\/p>\n<p>Each high-level user-facing interface (such as Docker and Kubernetes) now benefits from a choice of interchangeable low-level container runtimes (like containerd and runC). This enables a greater degree of flexibility and lets new container-based technologies establish themselves in a standards-aligned manner.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/10075\/what-is-containerd-and-how-does-it-relate-to-docker-and-kubernetes\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#What Is containerd, And How Does It Relate to Docker and Kubernetes? \u2013 CloudSavvy IT&#8221; Containers still mean \u201cDocker\u201d to many people. Docker popularised the modern use of containers in software development and deployment. These days, other technologies are around too. Here\u2019s how Containerd, Docker and Kubernetes relate to each other. The Beginnings At its&#8230;<\/p>\n","protected":false},"author":1,"featured_media":199706,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/210d2ba87928d47640e3439d45fe89e4\/p\/uploads\/2021\/03\/620c8dee.jpg","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-199705","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/199705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=199705"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/199705\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/199706"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=199705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=199705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=199705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}