{"id":27289,"date":"2021-06-12T19:29:52","date_gmt":"2021-06-12T11:29:52","guid":{"rendered":"http:\/\/yankay.com\/?p=27289"},"modified":"2021-06-30T22:16:34","modified_gmt":"2021-06-30T14:16:34","slug":"containerd-will-replace-docker","status":"publish","type":"post","link":"http:\/\/yankay.com\/containerd-will-replace-docker\/","title":{"rendered":"\u542c\u8bf4 Docker \u88ab kubenetes \u629b\u5f03\u4e86\uff0c\u600e\u4e48\u529e\uff1fcontainerd"},"content":{"rendered":"\n

\u539f\u6587\u5730\u5740\uff1a\u539f\u6587\u94fe\u63a5<\/a>\uff0c\u4f5c\u8005\uff1a \u5f20\u4e16\u660e<\/a><\/p>\n\n\n\n

Containerd \u662f Kubernetes \u9ed8\u8ba4\u7684\u6807\u51c6 CRI \u8fd0\u884c\u65f6\u73af\u5883\uff0c\u88ab Kubernetes, Docker \u7b49\u5404\u79cd\u9879\u76ee\u4f7f\u7528\u3002\u4e5f\u662f CNCF \u552f\u4e00\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u3002Docker \u5728\u6700\u8fd1\u8fd9\u4e9b\u5e74 \uff0c\u6ca1\u6709\u592a\u591a\u65b0\u7279\u6027\u5f15\u5165\uff0c\u800c\u66f4\u8f7b\u91cf\u7684 containerd \u6b63\u5728\u84ec\u52c3\u53d1\u5c55\u3002 Docker\u516c\u53f8 \u6b63\u5728\u8870\u843d<\/a>\uff0cContainerd \u5c06\u7ee7\u627f\u8863\u94b5\uff0c\u6210\u4e3a\u672a\u6765\u5bb9\u5668\u5f15\u64ce\u7684\u5b9e\u65bd\u6807\u51c6\u3002<\/strong><\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Containerd \u7684\u4f7f\u7528\u60c5\u51b5<\/h2>\n\n\n\n

Containerd \u5e76\u975e\u4e00\u4e2a \u5168\u65b0\u6280\u672f\uff0c\u5b83\u662f\u7531 Docker \u516c\u53f8\u5f00\u6e90\uff0c\u4f5c\u4e3a docker \u7684\u6838\u5fc3\u7ec4\u4ef6\u5b58\u5728\u3002\u6839\u636e\u793e\u533a\u4e2d\u7684\u51e0\u4e2a\u6258\u7ba1\u670d\u52a1\u548c\u5f00\u6e90\u9879\u76ee\u4f7f\u7528\u7684\u7edf\u8ba1\uff0c\u5230 2020 \u5e74\u6b62 Containerd \u7684\u4f7f\u7528 (\u5305\u542b\u5728 Docker \u4e2d\u4f7f\u7528) \u5360\u5bb9\u5668\u4f7f\u7528\u7684 83%\u3002<\/p>\n\n\n\n

\"\"
continerd \u53ef\u4ee5\u4f5c\u4e3a kubelet \u548c docker \u7684 \u5bb9\u5668\u5f15\u64ce\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u5355\u72ec\u4f7f\u7528<\/figcaption><\/figure>\n\n\n\n

\u6839\u636e Sysdig \u7684\u7edf\u8ba1\u6570\u636e\uff0c\u4ece 2019 \u5e74 \u5230 2020 \u5e74\uff0cconatinerd \u7684\u72ec\u7acb\u4f7f\u7528\u7387\uff0c\u4e0a\u5347\u4e86 2\u500d\u3002\u4e0a\u5347\u8d8b\u52bf\u660e\u663e\u3002<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Containerd 1.5 \u7684\u4e00\u4e9b\u65b0\u7279\u6027<\/h2>\n\n\n\n

\u6700\u8fd1\u7684Containerd 1.5<\/a> \u4ee5\u4e8e2021\u5e745\u67084\u65e5\u53d1\u5e03\u3002\u8fd9\u662f Containerd\u7684\u7b2c6\u4e2a\u4e3b\u8981\u7248\u672c\u5305\u62ec\u8bb8\u591a\u7a33\u5b9a\u6027\u6539\u8fdb, \u4ee5\u53ca\u4ee3\u7801\u7ec4\u7ec7\u7ed3\u6784\u7684\u53d8\u5316\u4f7f\u540e\u7eed\u5f00\u53d1\u66f4\u65b9\u4fbf\u3002\u8be5\u7248\u672c\u9ed8\u8ba4\u542f\u7528\u652f\u6301 OCI crypt \u89e3\u5bc6\uff0c\u5e76\u5f15\u5165\u4e86\u5bf9zstd\u3001NRI \u548c FreeBSD \u7684\u5b9e\u9a8c\u6027\u652f\u6301\uff0c\u8fd8\u5305\u62ecCRI\u63d2\u4ef6\u7eb3\u5165\u4e3b\u5bb9\u5668\u5e93\u548c\u5207\u6362\u5230Go modules\u3002<\/p>\n\n\n\n

\u66f4\u597d\u7684\u538b\u7f29\u7b97\u6cd5\u652f\u6301<\/h3>\n\n\n\n

\u73b0\u5728\u9664\u4e86 gzip \u4e4b\u5916\uff0c\u8fd8\u652f\u6301 zstd \u4f5c\u4e3a\u955c\u50cf\u538b\u7f29\u7b97\u6cd5\u3002zstd \u662f Facebook \u57282016\u5e74\u5f00\u6e90\u7684\u65b0\u65e0\u635f\u538b\u7f29\u7b97\u6cd5\uff0c\u4f18\u70b9\u662f\u538b\u7f29\u7387\u548c\u538b\u7f29\/\u89e3\u538b\u7f29\u6027\u80fd\u90fd\u5f88\u7a81\u51fa\u3002<\/p>\n\n\n\n

zstd \u7684\u8bbe\u8ba1\u76ee\u7684\u662f\u8fbe\u5230\u4e0e deflate \u7b97\u6cd5(\u5f00\u53d1\u4e8e1991\u5e74\uff0c\u7528\u4e8egzip) \u76f8\u5f53\u7684\u538b\u7f29\u6bd4\uff0c \u5e76\u4e14\u66f4\u5feb\uff0c\u5c24\u5176\u662f\u89e3\u538b\u7684\u65f6\u5019\u3002<\/p>\n\n\n\n

zstd \u5728\u5176\u6700\u5927\u538b\u7f29\u7ea7\u522b\u7684\u538b\u7f29\u6bd4\u63a5\u8fd1 lzma\u3001lzham \u548c ppmx\uff0c\u5e76\u4e14\u6bd4 lza \u548c bzip2 \u6027\u80fd\u66f4\u597d\u3002\u5b83\u7684\u89e3\u538b\u901f\u5ea6\u6bd4\u4efb\u4f55\u5f53\u524d\u53ef\u7528\u7684\u7b97\u6cd5\u90fd\u5feb\uff0c\u5e76\u4e14\u538b\u7f29\u6bd4\u66f4\u597d\u3002<\/p>\n\n\n\n

zstd<\/a> \u7684<\/code>\u57fa\u51c6\u6d4b\u8bd5\u7ed3\u679c<\/a> \u5728\u901f\u5ea6\u65b9\u9762\uff0c\u5728\u6700\u5feb\u6a21\u5f0f\u4e0b\uff0c\u5b83\u7684\u901f\u5ea6\u901a\u5e38\u662f stdlib deflate\/gzip 2\u500d\u3002<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

\u652f\u6301\u52a0\u5bc6\u955c\u50cf<\/h3>\n\n\n\n

\u53ef\u4ee5\u628a\u955c\u50cf\u52a0\u5bc6\u540e\u4e0a\u4f20\u5230\u955c\u50cf\u4ed3\u5e93, Containerd \u53ea\u9700\u8981\u914d\u7f6e\u89e3\u7801\u7684 key \u5c31\u53ef\u4ee5\u8fd0\u884c\u8fd9\u52a0\u5bc6\u7684\u955c\u50cf, \u5bf9\u4e8e\u4e00\u4e9b\u5bf9\u4e8e\u5b89\u5168\u6027\u6709\u9700\u6c42\u7684\u955c\u50cf\u53ef\u4ee5\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u3002<\/p>\n\n\n\n

\u81ea\u4ece Containerd 1.3 \u52a0\u5165\u8be5\u529f\u80fd\u540e\uff0c\u5df2\u652f\u6301\u5bb9\u5668\u4f7f\u7528 \u52a0\u5bc6\u955c\u50cf (OCI crypt)<\/a> \u4f46\u662f\u4e00\u76f4\u5e76\u6ca1\u6709\u542f\u7528\u8be5\u529f\u80fd\u3002<\/p>\n\n\n\n

\u8be5\u7279\u6027\u5c06\u5728 1.5 \u4e2d\u5df2\u7ecf\u9ed8\u8ba4\u542f\u7528\uff0c\u4f7f\u7528\u65b9\u6cd5\u8bf7\u53c2\u89c1\u6587\u6863<\/a> \uff08\u4f9d\u8d56\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u5305\u542b\u5728 cri-containerd-cni-1.5.0-linux-amd64.tar.gz<\/a> \uff09<\/p>\n\n\n\n

\u6ce8\u610f\uff1a\u5f53\u524d Docker \u662f\u4e0d\u652f\u6301 OCI crypt \u7684\uff0c\u56e0\u4e3a Docker \u76ee\u524d\u8fd8\u6ca1\u6709\u4f7f\u7528 Containerd \u7ba1\u7406\u955c\u50cf\u3002<\/p>\n\n\n\n

\u8282\u70b9\u8d44\u6e90\u63a5\u53e3<\/h3>\n\n\n\n

\u8282\u70b9\u8d44\u6e90\u63a5\u53e3(NRI<\/a>) \u7528\u4e8e CPU \u8c03\u5ea6\u7ea6\u675f\u548c\u5185\u5b58\u914d\u989d\u7684\u6807\u51c6\u63a5\u53e3\u3002<\/p>\n\n\n\n

\u5176\u7c7b\u4f3c\u5bb9\u5668\u7f51\u7edc\u63a5\u53e3(CNI<\/a>)\u7684\u57fa\u672c\u63a5\u53e3\u3001\u6982\u5ff5\u548c\u63d2\u4ef6\u8bbe\u8ba1\u662f\u4e00\u79cd\u5904\u7406\u5bb9\u5668\u7f51\u7edc\u5806\u6808\u7684\u591a\u79cd\u5b9e\u73b0\u7684\u4f18\u96c5\u65b9\u5f0f\u3002\u6b64\u6982\u5ff5\u53ef\u7528\u4e8e\u5176\u4ed6\u63a5\u53e3\uff0c\u4ee5\u5b9a\u5236\u5bb9\u5668\u7684\u8fd0\u884c\u65f6\u73af\u5883\u3002\u8282\u70b9\u8d44\u6e90\u63a5\u53e3(NRI<\/a>)\u662f\u4e00\u4e2a\u65b0\u7684\u63a5\u53e3\uff0c\u5176\u5b9e\u5e26\u6709\u7ed3\u6784\u5316API\u548c\u5bb9\u5668\u63d2\u4ef6\u8bbe\u8ba1\uff0c\u7528\u5bf9\u8282\u70b9\u4e0a\u7684\u8d44\u6e90\u8fdb\u884c\u7ba1\u7406\u3002\u4e0e CNI \u76f8\u540c NRI \u63d2\u4ef6\u5c06\u5728\u5bb9\u5668\u521b\u5efa\u5b8c\u6bd5, \u4f46\u662f\u8fd8\u6ca1\u6709\u771f\u6b63\u542f\u52a8\u4e4b\u524d\u7684\u521d\u59cb\u5316\u65f6\u88ab\u8c03\u7528\u3002<\/p>\n\n\n\n

\u53ef\u4ee5\u770b\u793a\u4f8b\u4ee3\u7801<\/a>\u4e86\u89e3 NRI \u7684\u4f7f\u7528\u3002<\/p>\n\n\n\n

\u652f\u6301 FreeBSD<\/h3>\n\n\n\n

\u73b0\u5728\u652f\u6301\u5728 FreeBSD \u8fd0\u884c Containerd\uff0c\u5bb9\u5668\u8fd0\u884c\u65f6 OCI \u662f\u4f7f\u7528 FreeBSD jails<\/a> (Samuel Karp \u7684 runj<\/a><\/code>)\u3002\u6587\u4ef6\u7cfb\u7edf\u76ee\u524d\u4ec5\u652f\u6301 ZFS, \u540e\u7eed\u8ba1\u5212\u652f\u6301 unionfs<\/a><\/code>\u3002<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

\u7ed3\u5c3e<\/h2>\n\n\n\n

\u539f\u6587\u4f5c\u8005\u201c\u5f20\u4e16\u660e\u201d\u662f \u4efb\u804c DaoCloud \u7814\u53d1\u56e2\u961f\u7684 \u5929\u624d\u9752\u5e74\uff0c\u5728\u8fc7\u53bb\u7684 \u534a\u5e74\uff0c\u5728 containerd \u793e\u533a \u6392\u540d\u7b2c\u516b<\/strong>\u7684\u8d21\u732e\u8005\u3002<\/p>\n\n\n\n

\u611f\u8c22\u201c\u80d6\u6a58<\/a>\u201c\u5bf9\u672c\u6587\u7684\u6da6\u8272\u52a0\u5de5\u3002<\/p>\n\n\n\n

\u5404\u4f4d\u89c2\u4f17\u8001\u7237\uff0c\u60a8\u662f\u5426\u770b\u597d containerd \u5462\uff1f<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"

\u539f\u6587\u5730\u5740\uff1a\u539f\u6587\u94fe\u63a5\uff0c\u4f5c\u8005\uff1a \u5f20\u4e16\u660e Containerd \u662f Kubernetes \u9ed8\u8ba4\u7684\u6807\u51c6 CRI \u8fd0\u884c\u65f6 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[138],"yoast_head":"\n\u542c\u8bf4 Docker \u88ab kubenetes \u629b\u5f03\u4e86\uff0c\u600e\u4e48\u529e\uff1fcontainerd - \u6211\u81ea\u7136<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/yankay.com\/containerd-will-replace-docker\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u542c\u8bf4 Docker \u88ab kubenetes \u629b\u5f03\u4e86\uff0c\u600e\u4e48\u529e\uff1fcontainerd - \u6211\u81ea\u7136\" \/>\n<meta property=\"og:description\" content=\"\u539f\u6587\u5730\u5740\uff1a\u539f\u6587\u94fe\u63a5\uff0c\u4f5c\u8005\uff1a \u5f20\u4e16\u660e Containerd \u662f Kubernetes \u9ed8\u8ba4\u7684\u6807\u51c6 CRI \u8fd0\u884c\u65f6 […]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/yankay.com\/containerd-will-replace-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6211\u81ea\u7136\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-12T11:29:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-30T14:16:34+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/yankay.com\/wp-content\/uploads\/2021\/06\/containerd-architecture-1024x621.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/yankay.com\/#website\",\"url\":\"http:\/\/yankay.com\/\",\"name\":\"\\u6211\\u81ea\\u7136\",\"description\":\"\\u989c\\u5f00\\u7684\\u535a\\u5ba2\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"http:\/\/yankay.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/#primaryimage\",\"inLanguage\":\"zh-CN\",\"url\":\"http:\/\/yankay.com\/wp-content\/uploads\/2021\/06\/containerd-architecture.png\",\"contentUrl\":\"http:\/\/yankay.com\/wp-content\/uploads\/2021\/06\/containerd-architecture.png\",\"width\":1782,\"height\":1080},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/#webpage\",\"url\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/\",\"name\":\"\\u542c\\u8bf4 Docker \\u88ab kubenetes \\u629b\\u5f03\\u4e86\\uff0c\\u600e\\u4e48\\u529e\\uff1fcontainerd - \\u6211\\u81ea\\u7136\",\"isPartOf\":{\"@id\":\"http:\/\/yankay.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/#primaryimage\"},\"datePublished\":\"2021-06-12T11:29:52+00:00\",\"dateModified\":\"2021-06-30T14:16:34+00:00\",\"author\":{\"@id\":\"http:\/\/yankay.com\/#\/schema\/person\/f52d918e9bfa51c4454172c2caa7704f\"},\"breadcrumb\":{\"@id\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/yankay.com\/containerd-will-replace-docker\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"http:\/\/yankay.com\/\",\"url\":\"http:\/\/yankay.com\/\",\"name\":\"\\u9996\\u9875\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"http:\/\/yankay.com\/containerd-will-replace-docker\/#webpage\"}}]},{\"@type\":\"Person\",\"@id\":\"http:\/\/yankay.com\/#\/schema\/person\/f52d918e9bfa51c4454172c2caa7704f\",\"name\":\"yankay\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/yankay.com\/#personlogo\",\"inLanguage\":\"zh-CN\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/426bb830224c1471011d92a830a6ed4f?s=96&d=wavatar&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/426bb830224c1471011d92a830a6ed4f?s=96&d=wavatar&r=g\",\"caption\":\"yankay\"},\"sameAs\":[\"http:\/\/47.100.65.109\"],\"url\":\"http:\/\/yankay.com\/author\/yankay\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/posts\/27289"}],"collection":[{"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/comments?post=27289"}],"version-history":[{"count":25,"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/posts\/27289\/revisions"}],"predecessor-version":[{"id":27331,"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/posts\/27289\/revisions\/27331"}],"wp:attachment":[{"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/media?parent=27289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/categories?post=27289"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yankay.com\/wp-json\/wp\/v2\/tags?post=27289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}