{"id":326603,"date":"2021-07-18T09:00:13","date_gmt":"2021-07-18T09:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326603"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326603","title":{"rendered":"\u0417\u0430\u043f\u0438\u0441\u043a\u0438 \u043e containerd"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432 \u043f\u044f\u0442\u044b\u0439 \u0440\u0430\u0437 \u0443 \u0442\u0435\u0431\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0430\u0434\u0430\u0432\u0430\u043d, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0430\u0437, \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0441\u0432\u0435\u0442\u043b\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u0440\u0435\u0447\u0438 \u0437\u0430\u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u043f\u0443\u0442\u043d\u043e \u0445\u043e\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u043e. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0438\u044f \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043e \u0441ontainerd \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0442\u044b\u0439 \u0440\u0430\u0437. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043c\u0443-\u0442\u043e \u0435\u0449\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0445\u043e\u0442\u044f \u0442\u0443\u0442 \u0432\u0441\u0435 \u0431\u0435\u0437 \u0440\u043e\u043a\u0435\u0442-\u0441\u0430\u0439\u043d\u0441.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 \u0438\u0437 \u0440\u0435\u043b\u0438\u0437\u0430 containerd \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u043d\u0430\u0440\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>containerd<\/p>\n<\/li>\n<li>\n<p>containerd-shim<\/p>\n<\/li>\n<li>\n<p>containerd-shim-runc-v1<\/p>\n<\/li>\n<li>\n<p>containerd-shim-runc-v2<\/p>\n<\/li>\n<li>\n<p>crictl<\/p>\n<\/li>\n<li>\n<p>ctr<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u043c\u043e\u043d containerd \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 overlayfs \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0437 &#171;\u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432&#187;. \u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 containerd \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 &#171;\u0441\u043b\u043e\u0438&#187; \u0434\u043e\u043a\u0435\u0440\/cri \u043e\u0431\u0440\u0430\u0437\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0443\u043b\u044c overlay \u0431\u044b\u043b \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0432 \u044f\u0434\u0440\u0435 (modprobe overlay) \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 systemd-unit \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/containerd.service\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/docs\/man\/containerd-config.toml.5.md\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430<\/a> containerd, \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/docs\/cri\/config.md\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c <\/a>\u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c insecure registry<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>[plugins]   [plugins.cri.containerd]     snapshotter = \"overlayfs\"     [plugins.cri.registry.mirrors.\"local.insecure-registry.io\"]       endpoint = [\" http:\/\/registry.com:5000\"]<\/code><\/pre>\n<\/div>\n<\/details>\n<p>Kubelet \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 containerd \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442: <\/p>\n<p><em>&#8212;container-runtime-endpoint=unix:\/\/\/var\/run\/containerd\/containerd.sock<\/em><\/p>\n<p>\u0421ontainerd, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0441\u043f\u0435\u043a\u0438 \u043e\u0442 \u043a\u0443\u0431\u0435\u043b\u0435\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 &#8212; containerd-shim, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u044c \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u042d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/opencontainers\/runc\/releases\" rel=\"noopener noreferrer nofollow\">runc<\/a>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 api, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 containerd-shim. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f v2. (\u041f\u0440\u043e\u0448\u0443 \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0441 v1). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/runtime\/v2\/README.md\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0421ontainerd-shim \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043a \u0434\u0435\u043c\u043e\u043d\u0443 containerd, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0440\u0435\u0448\u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e &#171;unsecure registry&#187; \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0438, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d containerd. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c\u0438 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a containerd-shim, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<p><em>containerd-shim -namespace k8s.io -workdir \/var\/lib\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644 -address \/run\/containerd\/containerd.sock -containerd-binary \/usr\/bin\/containerd<\/em><\/p>\n<p><strong>-namespace<\/strong> \u0432 \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u0442, \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u0443\u0431\u0435. \u042d\u0442\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0430\u043c\u043e\u0433\u043e containerd. \u0414\u043b\u044f kubelet&#8217;\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441 k8s, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u0448\u043b\u0438 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0448\u0435 \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438.<\/p>\n<p><strong>-workdir<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e.<\/p>\n<p><strong>-address<\/strong> \u0438 <strong>-containerd-binary<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0441\u043e\u043a\u0435\u0442 \u0438 \u0431\u0438\u043d\u0430\u0440\u044c containerd (\u0430 \u0442\u043e\u0447\u043d\u0435\u0435, containerd-shim \u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 &#171;containerd publish&#187;), \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0435\u043c\u043e\u043d. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 containerd, \u0448\u0438\u043c\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0442 \u043e \u0441\u0432\u043e\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0441\u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 kubelet.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u0438\u043c containerd, \u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430, \u043a\u043e\u0438\u0445 \u0432 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u042d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u0432 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f runc, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0435\u0439 \u0438\u043b\u0438 &#171;\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439&#187;. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e (runc &#8212;help), \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 containerd, <em>runc list<\/em> \u043d\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442. \u042d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0431\u044c\u044e\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441\u0430\u043c containerd, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043a\u0443\u0431\u0430 \u044d\u0442\u043e: <\/p>\n<p><em>runc  &#8212;root \/run\/containerd\/runc\/k8s.io\/ list<\/em><\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <\/p>\n<p><em>root@kube03a:~#<\/em> <em>runc  &#8212;root \/run\/containerd\/runc\/k8s.io\/ state 2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>{   \"ociVersion\": \"1.0.2-dev\",   \"id\": \"2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\",   \"pid\": 28627,   \"status\": \"running\",   \"bundle\": \"\/run\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\",   \"rootfs\": \"\/run\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\/rootfs\",   \"created\": \"2021-07-05T02:22:28.018197224Z\",   \"annotations\": {     \"io.kubernetes.cri.container-name\": \"nginx\",     \"io.kubernetes.cri.container-type\": \"container\",     \"io.kubernetes.cri.image-name\": \"docker.io\/library\/nginx:latest\",     \"io.kubernetes.cri.sandbox-id\": \"aae43202632ad129b71f6672c3ca089e76a399d6234d89cc08751b85645f31c6\",     \"io.kubernetes.cri.sandbox-name\": \"nginx-7848d4b86f-xztfp\",     \"io.kubernetes.cri.sandbox-namespace\": \"default\"   },   \"owner\": \"\" }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041d\u043e runc, \u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0441\u0442\u0438, \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. Containerd \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0433\u0430\u0435\u0442 \u0434\u0432\u0443\u043c\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043d\u0438\u043c: crictl \u0438 ctr.<\/p>\n<p><strong>crictl<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 containerd. \u041f\u043e\u043c\u0438\u043c\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043f\u0440\u0438\u0441\u0443\u0449\u0438\u0445 docker cli (\u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 <em>create<\/em>, <em>exec<\/em>, <em>images<\/em> \u0438 \u0442\u0434), \u0435\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, containerd \u0437\u043d\u0430\u0435\u0442 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u0430\u043a \u043a\u0443\u0431\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u044b (<em>runp<\/em>, <em>rmp<\/em>, <em>pods<\/em>, <em>stopp<\/em>, <em>inspectp<\/em>). \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 containerd \u0434\u0435\u043c\u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0430 crictl \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043e\u043a\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <\/p>\n<p><em>crictl &#8212;runtime-endpoint \/var\/run\/containerd\/containerd.sock<\/em><\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 info:<\/p>\n<p><em>root@kube03a:~# crictl info 2d538b1bdc00a | jq -r &#8216;.status&#8217;<\/em> <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>{   \"conditions\": [     {       \"type\": \"RuntimeReady\",       \"status\": true,       \"reason\": \"\",       \"message\": \"\"     },     {       \"type\": \"NetworkReady\",       \"status\": true,       \"reason\": \"\",       \"message\": \"\"     }   ] }<\/code><\/pre>\n<\/div>\n<\/details>\n<p><strong>crictl inspect<\/strong> \u0438 <strong>inspectp<\/strong> \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043e, \u0434\u0430 \u0438 \u0432\u0441\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0430\u0443\u043d\u0442\u044b: <\/p>\n<p><em>crictl inspect 2d538b1bdc00a | jq -r &#8216;.info.runtimeSpec.mounts[]&#8217;<\/em> <\/p>\n<details class=\"spoiler\">\n<summary>&#8230;\u0433\u0434\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 resolv.conf <\/summary>\n<div class=\"spoiler__content\">\n<pre><code>... {   \"destination\": \"\/etc\/resolv.conf\",   \"type\": \"bind\",   \"source\": \"\/var\/lib\/containerd\/io.containerd.grpc.v1.cri\/sandboxes\/aae43202632ad129b71f6672c3ca089e76a399d6234d89cc08751b85645f31c6\/resolv.conf\",   \"options\": [     \"rbind\",     \"rprivate\",     \"rw\"   ] } ...<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043f\u043e\u0434\u0435: <\/p>\n<p><em>crictl inspectp aae43202632ad | jq -r &#8216;.info.cniResult.Interfaces&#8217;<\/em> <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>{   \"cnio0\": {     \"IPConfigs\": null,     \"Mac\": \"3e:44:1a:e2:03:f0\",     \"Sandbox\": \"\"   },   \"eth0\": {     \"IPConfigs\": [       {         \"IP\": \"10.150.21.7\",         \"Gateway\": \"10.150.21.1\"       }     ],     \"Mac\": \"5a:fe:ec:a0:c2:59\",     \"Sandbox\": \"\/var\/run\/netns\/cni-6070de8e-4e69-99c0-e619-63535af42ce5\"   },   \"lo\": {     \"IPConfigs\": [       {         \"IP\": \"127.0.0.1\",         \"Gateway\": \"\"       },       {         \"IP\": \"::1\",         \"Gateway\": \"\"       }     ],     \"Mac\": \"00:00:00:00:00:00\",     \"Sandbox\": \"\/var\/run\/netns\/cni-6070de8e-4e69-99c0-e619-63535af42ce5\"   },   \"veth335fa7aa\": {     \"IPConfigs\": null,     \"Mac\": \"de:30:14:fa:26:57\",     \"Sandbox\": \"\"   } }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b: <\/p>\n<p><em>crictl inspectp aae43202632ad | jq -r &#8216;.info.runtimeSpec.linux.namespaces&#8217;<\/em> <\/p>\n<p>\u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0438\u043c\u044f \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441\u0430 (\u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c-\u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441)<\/p>\n<pre><code>...    {     \"type\": \"network\",     \"path\": \"\/var\/run\/netns\/cni-6070de8e-4e69-99c0-e619-63535af42ce5\"   } ...<\/code><\/pre>\n<p>\u0412\u0431\u0438\u0432\u0430\u0435\u043c <\/p>\n<p><em>ip netns exec cni-6070de8e-4e69-99c0-e619-63535af42ce5 ip a show type veth<\/em> <\/p>\n<p>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438 \u0432 \u0438\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u043f\u043e\u0434\u0435.<\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a crictl.  <\/p>\n<p><strong>crictl stats -a<\/strong> \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 (<em>cpu<\/em>, <em>disk<\/em>, <em>mem<\/em>, <em>inodes<\/em>), \u0430 \u0444\u043b\u0430\u0433 <em>-o json<\/em> \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c \u0432\u0441\u0435 \u0435\u0449\u0435 \u0438 \u0432 json \u0432\u0438\u0434\u0435, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0447\u0442\u043e-\u0442\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u0435.<\/p>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, crictl imagefsinfo \u0432\u0435\u0440\u043d\u0435\u0442 \u0432\u0430\u043c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435: <\/p>\n<pre><code>{   \"status\": {     \"timestamp\": \"1626124762748935841\",     \"fsId\": {       \"mountpoint\": \"\/var\/lib\/containerd\/io.containerd.snapshotter.v1.overlayfs\"     },     \"usedBytes\": {       \"value\": \"1969491968\"     },     \"inodesUsed\": {       \"value\": \"77458\"     }   } }<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430: <\/p>\n<p><em>root@kube03a:~# cat &#171;\/proc\/$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.info.pid&#8217;)\/cmdline&#187;<\/em> <\/p>\n<p>&#8230;\u0432\u0435\u0440\u043d\u0435\u0442:<\/p>\n<p><em>nginx: master process nginx -g daemon off;<\/em><\/p>\n<p>\u0410 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \/proc\/$PID\/root\/ <\/p>\n<p><em>root@kube03a:~# cat &#171;\/proc\/$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.info.pid&#8217;)\/root\/etc\/hostname&#187;<\/em><code> <\/code><\/p>\n<p><em>nginx-7848d4b86f-xztfp<\/em> <\/p>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 inpect \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443\u0436\u0435 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u0435\u0449\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, id \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430: <\/p>\n<p><em>\u0441rictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;<\/em> <\/p>\n<p><em>2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644<\/em><\/p>\n<p>\u0427\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 id \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c\u0438: <\/p>\n<p><em>root@kube03a:~# ls \/var\/run\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;)<\/em><code> <\/code><\/p>\n<p><em>address  config.json  init.pid  log.json  rootfs  shim.pid<\/em><\/p>\n<p><strong>init.pid<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043d\u0430\u043c pid \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0430 <strong>shim.pid<\/strong> &#8212; pid \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e containerd-shim. \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <strong>rootfs<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432 (\u0441\u043b\u043e\u0435\u0432) overlayfs \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043d\u043e \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 cgroups, \u0442\u043e \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 cgroups. \u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d \u0434\u0440\u0430\u0439\u0432\u0435\u0440 systemd, \u0442\u043e \u043f\u0443\u0442\u044c \u0432 cgroups_v1 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: <\/p>\n<p><em>root@kube03a:~# cat \/sys\/fs\/cgroup\/pids\/system.slice\/containerd.service\/kubepods-besteffort-pod$(crictl inspectp aae43202632ad | jq -r &#8216;.status.metadata.uid&#8217; | sed  &#8216;s\/-\/_\/g&#8217;).slice:cri-containerd:$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;)\/cgroup.procs<\/em><\/p>\n<pre><code>28627 28664 28665<\/code><\/pre>\n<p><em>\u043f\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438: <\/em><\/p>\n<p><em>cat \/sys\/fs\/cgroup\/pids\/system.slice\/containerd.service\/kubepods-besteffort-podc7205bb2_8c97_4f79_b4c9_915e402cc7d3.slice:cri-containerd:2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\/cgroup.procs<\/em><\/p>\n<p><em>crictl inspectp aae43202632ad | jq -r &#8216;.status.metadata.uid&#8217;<\/em> &#8212; \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c <strong>uid<\/strong> \u043f\u043e\u0434\u0430, \u0430 <em>crictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;<\/em> &#8212; \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043d\u0430\u043c <strong>id<\/strong> \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0434\u0440\u0443\u0433\u0438\u043c cgroups \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u0443 \u0432\u0430\u0441 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u0432\u044b\u0431\u0440\u0430\u043d cgrups: <\/p>\n<p><em>cat \/sys\/fs\/cgroup\/pids\/kubepods\/pod7d5e31f8-8797-457d-aaf2-f55464d338c6\/eb2c3ad61742de7ed7a8758cc563a1470b969632f857429787668e1f354e357a\/cgroup.procs<\/em><\/p>\n<p>\u0412 \u0440\u0435\u0430\u043b\u0442\u0430\u0439\u043c\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c cgroups \u0447\u0435\u0440\u0435\u0437 <code>systemd-cgtop -m<\/code>. \u0422\u0443\u0442 \u0432\u0435\u0434\u044c \u0432\u0441\u0435 \u043b\u044e\u0431\u044f\u0442 systemd, \u0442\u0430\u043a?<\/p>\n<p>\u0414\u043e\u0448\u043b\u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u0430\u043a\u0438 \u0434\u043e ctr <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b. <\/p>\n<p><em>ctr plugins ls<\/em> &#8212; \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0442\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u043b\u043e\u0435\u0432 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437. \u0415\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430 ZFS \u0438 BTRFS.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441\u044b containerd: <\/p>\n<p><em>ctr namespaces ls<\/em><\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441 &#171;k8s.io&#187;. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0435\u0433\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c: <em>ctr &#8212;namespace=k8s.io containers ls<\/em> <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <em>images<\/em> (\u043e\u0431\u0440\u0430\u0437\u044b), <em>events<\/em> (\u043e\u0442\u043b\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439), <em>content<\/em> (\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u043e\u0432), <em>snapshots<\/em> (\u0441\u043b\u043e\u0438 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u043e\u0432), <em>leases<\/em> (\u0430\u0440\u0435\u043d\u0434\u0430 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/docs\/garbage-collection.md\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0439 <\/a>), <em>tasks<\/em> (\u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b).<\/p>\n<p>\u0418\u0437 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 shim \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u0438 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u0430 \u0447\u0435\u0440\u0435\u0437 <em>crt install<\/em> (\u044d\u0442\u043e, \u0432\u0438\u0434\u0438\u043c\u043e, \u0434\u043b\u044f \u043e\u0441\u043e\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u044b\u0445).<\/p>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/debug-application-cluster\/crictl\/#create-a-container\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 <\/a>\u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 crictl \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/568274\/\"> https:\/\/habr.com\/ru\/post\/568274\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432 \u043f\u044f\u0442\u044b\u0439 \u0440\u0430\u0437 \u0443 \u0442\u0435\u0431\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u0430\u0434\u0430\u0432\u0430\u043d, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0430\u0437, \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0441\u0432\u0435\u0442\u043b\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u0440\u0435\u0447\u0438 \u0437\u0430\u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u043f\u0443\u0442\u043d\u043e \u0445\u043e\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u043e. \u0422\u0430\u043a \u0447\u0442\u043e \u0441\u0438\u044f \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u043e \u0441ontainerd \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0442\u044b\u0439 \u0440\u0430\u0437. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043c\u0443-\u0442\u043e \u0435\u0449\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0445\u043e\u0442\u044f \u0442\u0443\u0442 \u0432\u0441\u0435 \u0431\u0435\u0437 \u0440\u043e\u043a\u0435\u0442-\u0441\u0430\u0439\u043d\u0441.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 \u0438\u0437 \u0440\u0435\u043b\u0438\u0437\u0430 containerd \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u043d\u0430\u0440\u0435\u0439:<\/p>\n<ul>\n<li>\n<p>containerd<\/p>\n<\/li>\n<li>\n<p>containerd-shim<\/p>\n<\/li>\n<li>\n<p>containerd-shim-runc-v1<\/p>\n<\/li>\n<li>\n<p>containerd-shim-runc-v2<\/p>\n<\/li>\n<li>\n<p>crictl<\/p>\n<\/li>\n<li>\n<p>ctr<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0435\u043c\u043e\u043d containerd \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 overlayfs \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0437 &#171;\u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432&#187;. \u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 containerd \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 &#171;\u0441\u043b\u043e\u0438&#187; \u0434\u043e\u043a\u0435\u0440\/cri \u043e\u0431\u0440\u0430\u0437\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0443\u043b\u044c overlay \u0431\u044b\u043b \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0432 \u044f\u0434\u0440\u0435 (modprobe overlay) \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 systemd-unit \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/containerd.service\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/docs\/man\/containerd-config.toml.5.md\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430<\/a> containerd, \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/docs\/cri\/config.md\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c <\/a>\u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c insecure registry<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>[plugins]   [plugins.cri.containerd]     snapshotter = \"overlayfs\"     [plugins.cri.registry.mirrors.\"local.insecure-registry.io\"]       endpoint = [\" http:\/\/registry.com:5000\"]<\/code><\/pre>\n<\/div>\n<\/details>\n<p>Kubelet \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 containerd \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442: <\/p>\n<p><em>&#8212;container-runtime-endpoint=unix:\/\/\/var\/run\/containerd\/containerd.sock<\/em><\/p>\n<p>\u0421ontainerd, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0441\u043f\u0435\u043a\u0438 \u043e\u0442 \u043a\u0443\u0431\u0435\u043b\u0435\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 &#8212; containerd-shim, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u044c \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u042d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/opencontainers\/runc\/releases\" rel=\"noopener noreferrer nofollow\">runc<\/a>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 api, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 containerd-shim. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f v2. (\u041f\u0440\u043e\u0448\u0443 \u043f\u043e\u043d\u044f\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0441 v1). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/main\/runtime\/v2\/README.md\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0421ontainerd-shim \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043a \u0434\u0435\u043c\u043e\u043d\u0443 containerd, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0440\u0435\u0448\u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e &#171;unsecure registry&#187; \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0438, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d containerd. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c\u0438 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a containerd-shim, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<p><em>containerd-shim -namespace k8s.io -workdir \/var\/lib\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644 -address \/run\/containerd\/containerd.sock -containerd-binary \/usr\/bin\/containerd<\/em><\/p>\n<p><strong>-namespace<\/strong> \u0432 \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u0442, \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043a\u0443\u0431\u0435. \u042d\u0442\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0430\u043c\u043e\u0433\u043e containerd. \u0414\u043b\u044f kubelet&#8217;\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441 k8s, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u0448\u043b\u0438 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0448\u0435 \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438.<\/p>\n<p><strong>-workdir<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e.<\/p>\n<p><strong>-address<\/strong> \u0438 <strong>-containerd-binary<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0441\u043e\u043a\u0435\u0442 \u0438 \u0431\u0438\u043d\u0430\u0440\u044c containerd (\u0430 \u0442\u043e\u0447\u043d\u0435\u0435, containerd-shim \u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 &#171;containerd publish&#187;), \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0435\u043c\u043e\u043d. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 containerd, \u0448\u0438\u043c\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0442 \u043e \u0441\u0432\u043e\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0441\u0435\u0433\u043e \u0441 \u043d\u0443\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 kubelet.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u0438\u043c containerd, \u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430, \u043a\u043e\u0438\u0445 \u0432 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u042d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u043c \u0432 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f runc, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0435\u0439 \u0438\u043b\u0438 &#171;\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439&#187;. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e (runc &#8212;help), \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 containerd, <em>runc list<\/em> \u043d\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442. \u042d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0431\u044c\u044e\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441\u0430\u043c containerd, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043a\u0443\u0431\u0430 \u044d\u0442\u043e: <\/p>\n<p><em>runc  &#8212;root \/run\/containerd\/runc\/k8s.io\/ list<\/em><\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <\/p>\n<p><em>root@kube03a:~#<\/em> <em>runc  &#8212;root \/run\/containerd\/runc\/k8s.io\/ state 2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644<\/em><\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>{   \"ociVersion\": \"1.0.2-dev\",   \"id\": \"2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\",   \"pid\": 28627,   \"status\": \"running\",   \"bundle\": \"\/run\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\",   \"rootfs\": \"\/run\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644\/rootfs\",   \"created\": \"2021-07-05T02:22:28.018197224Z\",   \"annotations\": {     \"io.kubernetes.cri.container-name\": \"nginx\",     \"io.kubernetes.cri.container-type\": \"container\",     \"io.kubernetes.cri.image-name\": \"docker.io\/library\/nginx:latest\",     \"io.kubernetes.cri.sandbox-id\": \"aae43202632ad129b71f6672c3ca089e76a399d6234d89cc08751b85645f31c6\",     \"io.kubernetes.cri.sandbox-name\": \"nginx-7848d4b86f-xztfp\",     \"io.kubernetes.cri.sandbox-namespace\": \"default\"   },   \"owner\": \"\" }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041d\u043e runc, \u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0441\u0442\u0438, \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. Containerd \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0433\u0430\u0435\u0442 \u0434\u0432\u0443\u043c\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043d\u0438\u043c: crictl \u0438 ctr.<\/p>\n<p><strong>crictl<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 containerd. \u041f\u043e\u043c\u0438\u043c\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043f\u0440\u0438\u0441\u0443\u0449\u0438\u0445 docker cli (\u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 <em>create<\/em>, <em>exec<\/em>, <em>images<\/em> \u0438 \u0442\u0434), \u0435\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, containerd \u0437\u043d\u0430\u0435\u0442 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u0430\u043a \u043a\u0443\u0431\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u044b (<em>runp<\/em>, <em>rmp<\/em>, <em>pods<\/em>, <em>stopp<\/em>, <em>inspectp<\/em>). \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 containerd \u0434\u0435\u043c\u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0430 crictl \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u043e\u043a\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <\/p>\n<p><em>crictl &#8212;runtime-endpoint \/var\/run\/containerd\/containerd.sock<\/em><\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 info:<\/p>\n<p><em>root@kube03a:~# crictl info 2d538b1bdc00a | jq -r &#8216;.status&#8217;<\/em> <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>{   \"conditions\": [     {       \"type\": \"RuntimeReady\",       \"status\": true,       \"reason\": \"\",       \"message\": \"\"     },     {       \"type\": \"NetworkReady\",       \"status\": true,       \"reason\": \"\",       \"message\": \"\"     }   ] }<\/code><\/pre>\n<\/div>\n<\/details>\n<p><strong>crictl inspect<\/strong> \u0438 <strong>inspectp<\/strong> \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043e, \u0434\u0430 \u0438 \u0432\u0441\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0430\u0443\u043d\u0442\u044b: <\/p>\n<p><em>crictl inspect 2d538b1bdc00a | jq -r &#8216;.info.runtimeSpec.mounts[]&#8217;<\/em> <\/p>\n<details class=\"spoiler\">\n<summary>&#8230;\u0433\u0434\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 resolv.conf <\/summary>\n<div class=\"spoiler__content\">\n<pre><code>... {   \"destination\": \"\/etc\/resolv.conf\",   \"type\": \"bind\",   \"source\": \"\/var\/lib\/containerd\/io.containerd.grpc.v1.cri\/sandboxes\/aae43202632ad129b71f6672c3ca089e76a399d6234d89cc08751b85645f31c6\/resolv.conf\",   \"options\": [     \"rbind\",     \"rprivate\",     \"rw\"   ] } ...<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u043f\u043e\u0434\u0435: <\/p>\n<p><em>crictl inspectp aae43202632ad | jq -r &#8216;.info.cniResult.Interfaces&#8217;<\/em> <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>{   \"cnio0\": {     \"IPConfigs\": null,     \"Mac\": \"3e:44:1a:e2:03:f0\",     \"Sandbox\": \"\"   },   \"eth0\": {     \"IPConfigs\": [       {         \"IP\": \"10.150.21.7\",         \"Gateway\": \"10.150.21.1\"       }     ],     \"Mac\": \"5a:fe:ec:a0:c2:59\",     \"Sandbox\": \"\/var\/run\/netns\/cni-6070de8e-4e69-99c0-e619-63535af42ce5\"   },   \"lo\": {     \"IPConfigs\": [       {         \"IP\": \"127.0.0.1\",         \"Gateway\": \"\"       },       {         \"IP\": \"::1\",         \"Gateway\": \"\"       }     ],     \"Mac\": \"00:00:00:00:00:00\",     \"Sandbox\": \"\/var\/run\/netns\/cni-6070de8e-4e69-99c0-e619-63535af42ce5\"   },   \"veth335fa7aa\": {     \"IPConfigs\": null,     \"Mac\": \"de:30:14:fa:26:57\",     \"Sandbox\": \"\"   } }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b: <\/p>\n<p><em>crictl inspectp aae43202632ad | jq -r &#8216;.info.runtimeSpec.linux.namespaces&#8217;<\/em> <\/p>\n<p>\u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0438\u043c\u044f \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441\u0430 (\u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c-\u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0435\u043c\u0441\u043f\u0435\u0439\u0441)<\/p>\n<pre><code>...    {     \"type\": \"network\",     \"path\": \"\/var\/run\/netns\/cni-6070de8e-4e69-99c0-e619-63535af42ce5\"   } ...<\/code><\/pre>\n<p>\u0412\u0431\u0438\u0432\u0430\u0435\u043c <\/p>\n<p><em>ip netns exec cni-6070de8e-4e69-99c0-e619-63535af42ce5 ip a show type veth<\/em> <\/p>\n<p>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438 \u0432 \u0438\u0441\u043f\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u043f\u043e\u0434\u0435.<\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a crictl.  <\/p>\n<p><strong>crictl stats -a<\/strong> \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0441 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 (<em>cpu<\/em>, <em>disk<\/em>, <em>mem<\/em>, <em>inodes<\/em>), \u0430 \u0444\u043b\u0430\u0433 <em>-o json<\/em> \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c \u0432\u0441\u0435 \u0435\u0449\u0435 \u0438 \u0432 json \u0432\u0438\u0434\u0435, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0447\u0442\u043e-\u0442\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u0435.<\/p>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, crictl imagefsinfo \u0432\u0435\u0440\u043d\u0435\u0442 \u0432\u0430\u043c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435: <\/p>\n<pre><code>{   \"status\": {     \"timestamp\": \"1626124762748935841\",     \"fsId\": {       \"mountpoint\": \"\/var\/lib\/containerd\/io.containerd.snapshotter.v1.overlayfs\"     },     \"usedBytes\": {       \"value\": \"1969491968\"     },     \"inodesUsed\": {       \"value\": \"77458\"     }   } }<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430: <\/p>\n<p><em>root@kube03a:~# cat &#171;\/proc\/$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.info.pid&#8217;)\/cmdline&#187;<\/em> <\/p>\n<p>&#8230;\u0432\u0435\u0440\u043d\u0435\u0442:<\/p>\n<p><em>nginx: master process nginx -g daemon off;<\/em><\/p>\n<p>\u0410 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \/proc\/$PID\/root\/ <\/p>\n<p><em>root@kube03a:~# cat &#171;\/proc\/$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.info.pid&#8217;)\/root\/etc\/hostname&#187;<\/em><code> <\/code><\/p>\n<p><em>nginx-7848d4b86f-xztfp<\/em> <\/p>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 inpect \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443\u0436\u0435 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u0435\u0449\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, id \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430: <\/p>\n<p><em>\u0441rictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;<\/em> <\/p>\n<p><em>2d538b1bdc00a5f6251c9f47babca6163794a065133bcd2a0a0264a37a533644<\/em><\/p>\n<p>\u0427\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 id \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u043c\u0438: <\/p>\n<p><em>root@kube03a:~# ls \/var\/run\/containerd\/io.containerd.runtime.v1.linux\/k8s.io\/$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;)<\/em><code> <\/code><\/p>\n<p><em>address  config.json  init.pid  log.json  rootfs  shim.pid<\/em><\/p>\n<p><strong>init.pid<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043d\u0430\u043c pid \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0430 <strong>shim.pid<\/strong> &#8212; pid \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e containerd-shim. \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <strong>rootfs<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432 (\u0441\u043b\u043e\u0435\u0432) overlayfs \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043d\u043e \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 cgroups, \u0442\u043e \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 cgroups. \u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d \u0434\u0440\u0430\u0439\u0432\u0435\u0440 systemd, \u0442\u043e \u043f\u0443\u0442\u044c \u0432 cgroups_v1 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: <\/p>\n<p><em>root@kube03a:~# cat \/sys\/fs\/cgroup\/pids\/system.slice\/containerd.service\/kubepods-besteffort-pod$(crictl inspectp aae43202632ad | jq -r &#8216;.status.metadata.uid&#8217; | sed  &#8216;s\/-\/_\/g&#8217;).slice:cri-containerd:$(crictl inspect 2d538b1bdc00a  | jq -r &#8216;.status.id&#8217;)\/cgroup.procs<\/em><\/p>\n<pre><code>28627 28664 28665<\/code><\/pre>\n<p><em>\u043f\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438: <\/em><\/p>\n<p><em>cat<\/em><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-326603","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326603"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326603\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}