{"id":11601,"date":"2025-07-27T09:59:31","date_gmt":"2025-07-27T01:59:31","guid":{"rendered":"https:\/\/egonlin.com\/?p=11601"},"modified":"2025-07-27T09:59:31","modified_gmt":"2025-07-27T01:59:31","slug":"%e5%a6%82%e4%bd%95%e9%98%85%e8%af%bbk8s%e6%ba%90%e7%a0%81%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=11601","title":{"rendered":"\u5982\u4f55\u9605\u8bfbk8s\u6e90\u7801\uff1f"},"content":{"rendered":"<header class=\"max-w-3xl page-width-wide:max-w-screen-2xl mx-auto mb-6 space-y-3 page-api-block:ml-0 page-api-block:max-w-full\">\n<h1 class=\"text-4xl font-bold flex items-center gap-4 grow text-pretty clear-right xs:clear-none\">\u5982\u4f55\u9605\u8bfbk8s\u6e90\u7801<\/h1>\n<\/header>\n<div class=\"grid [&amp;&gt;*+*]:mt-5 whitespace-pre-wrap\">\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u672c\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728windows\u4e0b\u901a\u8fc7goland\u9605\u8bfbk8s\u6e90\u7801\u3002<\/p>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-tight\">\u4e0b\u8f7d\u53caidea\u52a0\u8f7dGO\u4ee3\u7801<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u8fd9\u8fb9\u5927\u5bb6\u53ef\u4ee5\u767e\u5ea6\u4e00\u4e0b\uff0c\u641c\u4e00\u4e0bgo\u7684\u4e0b\u8f7d\u53ca\u7834\u89e3\u7248goland\u7684\u4e0b\u8f7d\uff0c\u7f51\u4e0a\u6559\u7a0b\u5f88\u591a\uff0c\u6309\u7167\u987a\u5e8f\u6309\u7167\u4e0b\u8f7d\u5373\u53ef\u3002\u6211\u8fd9\u91cc\u7684\u7248\u672c\u5982\u4e0b<\/p>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">go: 1.15 goland: 2020.1<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\">\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\":S1:\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">C:\\Users\\nieweixing&gt;go version\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">go version go1.15 windows\/amd64<\/span><\/span><\/code><\/pre>\n<\/div>\n<div class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0 flex flex-row gap-3 justify-center\">\n<div class=\"relative overflow-hidden after:block after:absolute after:-inset-[0] after:pointer-events-none w-fit mx-auto\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252Fef7f0f58a47bcca573537a97a391ce8f11a2febb.png%3Fgeneration%3D1606373401980568%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=4ebd124&amp;sv=2'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" class=\"block\" data-original=\"https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252Fef7f0f58a47bcca573537a97a391ce8f11a2febb.png%3Fgeneration%3D1606373401980568%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=4ebd124&amp;sv=2\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" sizes=\"(max-width: 640px) 400px, 768px\"  alt=\"\" width=\"623\" height=\"381\" data-testid=\"zoom-image\" \/><\/div><\/div>\n<picture class=\"relative\">upload-image<\/picture><\/div>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-snug\">\u4ecegithub\u4e0a\u514b\u9686\u6e90\u7801\u5230\u672c\u5730<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u9996\u5148\u521b\u5efa\u4e00\u4e2agopath\u76ee\u5f55,\u6211\u4eec\u8fd9\u91cc\u7528\u7684\u662f<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR2d38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">D:\\go-code<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u7136\u540e\u5728go-code\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2asrc\/k8s.io,\u6700\u540e\u6211\u4eec\u5b58\u653e\u4ee3\u7801\u7684\u76ee\u5f55\u4e3a<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR2t38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">D:\\go-code\\src\\k8s.io<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u6211\u4eec\u5207\u6362\u5230k8s.io\u76ee\u5f55\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4clone\u4ee3\u7801\uff0c\u6ce8\u610f\u9700\u8981\u52a0\u4e0acore.symlinks=true\u8fd9\u4e2a\u53c2\u6570\uff0c\u6e90\u7801\u4e2d\u6709\u5f88\u591a\u8f6f\u8fde\u63a5\uff0c\u4e0d\u52a0\u8fd9\u4e2a\u53c2\u6570\u4f1a\u627e\u4e0d\u5230\u4f9d\u8d56\u3002<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR3d38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\"># \u514b\u9686\u6700\u65b0\u4ee3\u7801\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">git clone -c core.symlinks=true https:\/\/github.com\/kubernetes\/kubernetes\r\n<\/span><\/span>\r\n<span class=\"highlight-line\"><span class=\"highlight-line-content\"># \u514b\u9686\u67d0\u4e2a\u5206\u652f\u4ee3\u7801\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">git clone -c core.symlinks=true -b xxxx  https:\/\/github.com\/kubernetes\/kubernetes<\/span><\/span><\/code><\/pre>\n<\/div>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-snug\">goland\u67e5\u770b\u6e90\u7801\u5e76\u5206\u6790\u76ee\u5f55\u7ed3\u6784<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u6211\u4eec\u6253\u5f00goland\u540e\u914d\u7f6e\u597d$GOPATH,\u7136\u540e\u67e5\u770b\u4e0b\u5bf9\u5e94\u6e90\u7801\u5373\u53ef\u3002<\/p>\n<div class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0 flex flex-row gap-3 justify-center\">\n<div class=\"relative overflow-hidden after:block after:absolute after:-inset-[0] after:pointer-events-none w-fit mx-auto\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252Febc365a8ebe165ca358de14bb3c2d99021373dcb.png%3Fgeneration%3D1606373402660323%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=f48104&amp;sv=2'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" class=\"block ZoomImage_zoomImg__teSyL\" data-original=\"https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252Febc365a8ebe165ca358de14bb3c2d99021373dcb.png%3Fgeneration%3D1606373402660323%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=f48104&amp;sv=2\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" sizes=\"(max-width: 640px) 400px, 768px\"  alt=\"\" width=\"1590\" height=\"777\" data-testid=\"zoom-image\" \/><\/div><\/div>\n<picture class=\"relative\">upload-image<\/picture><\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u4e0b\u9762\u6211\u4eec\u7b80\u5355\u4ecb\u7ecd\u4e0bk8s\u6e90\u7801\u76ee\u5f55\u7684\u4f5c\u7528<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR4l38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--api  \/\/ \u5b58\u653eapi\u89c4\u8303\u76f8\u5173\u7684\u6587\u6863\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------api-rules  \/\/\u5df2\u7ecf\u5b58\u5728\u7684\u8fdd\u53cdApi\u89c4\u8303\u7684api\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------openapi-spec  \/\/OpenApi\u89c4\u8303\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--build \/\/ \u6784\u5efa\u548c\u6d4b\u8bd5\u811a\u672c\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------run.sh  \/\/\u5728\u5bb9\u5668\u4e2d\u8fd0\u884c\u8be5\u811a\u672c\uff0c\u540e\u9762\u53ef\u63a5\u591a\u4e2a\u547d\u4ee4\uff1amake, make cross \u7b49\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------copy-output.sh  \/\/\u628a\u5bb9\u5668\u4e2d_output\/dockerized\/bin\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u62f7\u8d1d\u5230\u672c\u5730\u76ee\u5f55\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------make-clean.sh  \/\/\u6e05\u7406\u5bb9\u5668\u4e2d\u548c\u672c\u5730\u7684_output\u76ee\u5f55\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------shell.sh  \/\/ \u5bb9\u5668\u4e2d\u542f\u52a8\u4e00\u4e2ashell\u7ec8\u7aef\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------......\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--cluster  \/\/ \u81ea\u52a8\u521b\u5efa\u548c\u914d\u7f6ekubernetes\u96c6\u7fa4\u7684\u811a\u672c\uff0c\u5305\u62ecnetworking, DNS, nodes\u7b49\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--cmd  \/\/ \u5185\u90e8\u5305\u542b\u5404\u4e2a\u7ec4\u4ef6\u7684\u5165\u53e3\uff0c\u5177\u4f53\u6838\u5fc3\u7684\u5b9e\u73b0\u90e8\u5206\u5728pkg\u76ee\u5f55\u4e0b\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--hack  \/\/ \u7f16\u8bd1\u3001\u6784\u5efa\u53ca\u6821\u9a8c\u7684\u5de5\u5177\u7c7b\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--logo \/\/ kubernetes\u7684logo\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--pkg \/\/ \u4e3b\u8981\u4ee3\u7801\u5b58\u653e\u7c7b\uff0c\u540e\u9762\u4f1a\u8be6\u7ec6\u8865\u5145\u8be5\u76ee\u5f55\u4e0b\u5185\u5bb9\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------kubeapiserver\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------kubectl\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------kubelet\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------proxy\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------registry\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------scheduler\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------security\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------watch\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------......\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--plugin\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------pkg\/admission  \/\/\u8ba4\u8bc1\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------pkg\/auth  \/\/\u9274\u6743\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--staging  \/\/ \u8fd9\u91cc\u7684\u4ee3\u7801\u90fd\u5b58\u653e\u5728\u72ec\u7acb\u7684repo\u4e2d\uff0c\u4ee5\u5f15\u7528\u5305\u7684\u65b9\u5f0f\u6dfb\u52a0\u5230\u9879\u76ee\u4e2d\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------k8s.io\/api\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------k8s.io\/apiextensions-apiserver\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------k8s.io\/apimachinery\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------k8s.io\/apiserver\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------k8s.io\/client-go\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|------......\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--test  \/\/\u6d4b\u8bd5\u4ee3\u7801\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--third_party  \/\/\u7b2c\u4e09\u65b9\u4ee3\u7801\uff0cprotobuf\u3001golang-reflect\u7b49\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">|--translations  \/\/\u4e0d\u540c\u56fd\u5bb6\u7684\u8bed\u8a00\u5305\uff0c\u4f7f\u7528poedit\u67e5\u770b\u53ca\u7f16\u8f91<\/span><\/span><\/code><\/pre>\n<\/div>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-tight\">Kubernetes\u6e90\u7801\u7f16\u8bd1<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u6211\u4eec\u77e5\u9053k8s\u7684\u8fd0\u884c\u8bbf\u95ee\u67092\u79cd\u65b9\u5f0f\uff0c\u4e00\u79cd\u662f\u4e8c\u8fdb\u5236\uff0c\u8fd8\u6709\u4e00\u79cd\u5c31\u662fdocker\u955c\u50cf\u7684\u65b9\u5f0f\uff0c\u4e0b\u9762\u6211\u4eec\u6765\u8bb2\u4e00\u4e0b\u5982\u4f55\u5c06\u6e90\u7801\u7f16\u8bd1\u6210\u4e8c\u8fdb\u5236\u548c\u955c\u50cf\u7684\u65b9\u5f0f\u3002<\/p>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-snug\">\u4e8c\u8fdb\u5236\u7f16\u8bd1kubernetes<\/div>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-snug\">\u7f16\u8bd1\u5168\u90e8\u7ec4\u4ef6<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u8fd9\u91cc\u6211\u4eec\u4ee5\u5728centos7\u4e0a\u4f5c\u4e3a\u793a\u4f8b<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR6538ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\"># yum install go -y\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># mkdir -p \/root\/go\/src\/k8s.io\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># git clone https:\/\/github.com\/kubernetes\/kubernetes\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># cd \/root\/go\/src\/k8s.io\/kubernetes\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># KUBE_BUILD_PLATFORMS=linux\/amd64 make<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u5728\u8fd9\u91cc\u6211\u4eec\u7f16\u8bd1apiserver\u7684\u65f6\u5019\u4f1a\u51fa\u73b0\u4e00\u4e2a\u9519\u8bef\uff0c\u63d0\u793a\u6211\u4eecapp\\server.go:477:70: undefined: &#8220;k8s.io\/kubernetes\/pkg\/generated\/openapi&#8221;.GetOpenAPIDefinitions\u3002<\/p>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u5728pkg\/generated\/openapi\u786e\u5b9e\u6ca1\u6709\u8fd9\u4e2a\u51fd\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u662f\u5728zz_generated.openapi.go\uff0c\u6211\u4eec\u9700\u8981\u5728\/root\/go\/src\/k8s.io\/kubernetes\u4e0b\u6267\u884c<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR6t38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\"># cd \/root\/go\/src\/k8s.io\/kubernetes\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># make generated_files\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># ls -l pkg\/generated\/openapi\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">total 2384\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw-r--r-- 1 root root    1216 Nov 23 11:23 BUILD\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw-r--r-- 1 root root     621 Nov 23 11:23 doc.go\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw-r--r-- 1 root root    1533 Nov 23 11:23 openapi_test.go\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw-r--r-- 1 root root     131 Nov 23 11:23 OWNERS\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw-r--r-- 1 root root 2423572 Nov 23 12:41 zz_generated.openapi.go<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u8fd9\u91cc\u6211\u4eec\u53d1\u73b0\u5df2\u7ecfzz_generated.openapi.go\u751f\u6210\u5728pkg\/generated\/openapi\u76ee\u5f55\u4e0b\uff0c\u5982\u679c\u4f60\u5728windows\u4e5f\u6709\u4ee3\u7801\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u628a\u8fd9\u4e2a\u6587\u4ef6\u62f7\u8d1d\u5230\u5bf9\u5e94\u76ee\u5f55\u4e0b\u3002<\/p>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u73b0\u5728\u6211\u4eec\u518d\u6267\u884c\u7f16\u8bd1\u547d\u4ee4\uff0c\u7136\u540e\u7f16\u8bd1\u597d\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u5728\/root\/go\/src\/k8s.io\/kubernetes\/_output\/bin\u8fd9\u4e2a\u76ee\u5f55\u4e0b<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR7l38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-13-centos kubernetes]# KUBE_BUILD_PLATFORMS=linux\/amd64 make\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 13:45:25] Building go targets for linux\/amd64:\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-proxy\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-apiserver\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-controller-manager\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kubelet\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kubeadm\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-scheduler\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    vendor\/k8s.io\/kube-aggregator\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    vendor\/k8s.io\/apiextensions-apiserver\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cluster\/gce\/gci\/mounter\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kubectl\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/gendocs\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/genkubedocs\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/genman\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/genyaml\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/genswaggertypedocs\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/linkcheck\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    vendor\/github.com\/onsi\/ginkgo\/ginkgo\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    test\/e2e\/e2e.test\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cluster\/images\/conformance\/go-runner\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kubemark\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    vendor\/github.com\/onsi\/ginkgo\/ginkgo\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    test\/e2e_node\/e2e_node.test\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-13-centos kubernetes]# ls _output\/bin\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">apiextensions-apiserver  e2e_node.test  genman              go2make     kube-aggregator          kubelet         linkcheck\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">conversion-gen           e2e.test       genswaggertypedocs  go-bindata  kube-apiserver           kubemark        mounter\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">deepcopy-gen             gendocs        genyaml             go-runner   kube-controller-manager  kube-proxy      openapi-gen\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">defaulter-gen            genkubedocs    ginkgo              kubeadm     kubectl                  kube-scheduler  prerelease-lifecycle-gen<\/span><\/span><\/code><\/pre>\n<\/div>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-snug\">\u7f16\u8bd1\u5355\u4e2a\u7ec4\u4ef6<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u6211\u4eec\u53ef\u4ee5\u53ea\u7f16\u8bd1\u67d0\u4e00\u4e2a\u7ec4\u4ef6\uff0c\u4e0b\u9762\u6211\u4eec\u6765\u6f14\u793a\u5982\u4f55\u53ea\u7f16\u8bd1kubelet\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u5728linux\u548cwindow\u4e0b\u90fd\u662f\u540c\u6837\u7684\u65b9\u5f0f\uff0c\u53ea\u662f\u7f16\u8bd1\u7684\u5e73\u53f0\u4e0d\u4e00\u6837\uff0c\u751f\u6210\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u4e0d\u4e00\u6837\uff0cwindow\u4e0b\u751f\u4ea7kubelet.exe,linux\u4e0b\u751f\u4ea7kubelet\u8fd9\u4e2a\u4e8c\u8fdb\u5236\u6267\u884c\u6587\u4ef6<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abR8l38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\"># cd $GOPATH\/src\/k8s.io\/kubernetes\/cmd\/kubelet\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\"># go build -v<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u6267\u884c\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u5728kubelet\u76ee\u5f55\u4e0b\u4f1a\u5b58\u5728\u53ef\u6267\u884c\u7684kubelet\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<div class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0 flex flex-row gap-3 justify-center\">\n<div class=\"relative overflow-hidden after:block after:absolute after:-inset-[0] after:pointer-events-none w-fit mx-auto\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252Fc62f190c4e9e469833de363896f180d33dda1341.png%3Fgeneration%3D1606373402336730%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=b64fe809&amp;sv=2'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" class=\"block ZoomImage_zoomImg__teSyL\" data-original=\"https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252Fc62f190c4e9e469833de363896f180d33dda1341.png%3Fgeneration%3D1606373402336730%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=b64fe809&amp;sv=2\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" sizes=\"(max-width: 640px) 400px, 768px\"  alt=\"\" width=\"812\" height=\"259\" data-testid=\"zoom-image\" \/><\/div><\/div>\n<picture class=\"relative\">upload-image<\/picture><\/div>\n<div class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0 flex flex-row gap-3 justify-center\">\n<div class=\"relative overflow-hidden after:block after:absolute after:-inset-[0] after:pointer-events-none w-fit mx-auto\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252F431698d87cb44991ee8ccee01f60df259c0f836d.png%3Fgeneration%3D1606373402191003%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=1756540d&amp;sv=2'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" class=\"block\" data-original=\"https:\/\/docs.niewx.cn\/~gitbook\/image?url=https%3A%2F%2F1743139827-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MMy-ccvHJYp-MpGyagk%252Fsync%252F431698d87cb44991ee8ccee01f60df259c0f836d.png%3Fgeneration%3D1606373402191003%26alt%3Dmedia&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=1756540d&amp;sv=2\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" sizes=\"(max-width: 640px) 400px, 768px\"  alt=\"\" width=\"537\" height=\"558\" data-testid=\"zoom-image\" \/><\/div><\/div>\n<picture class=\"relative\">upload-image<\/picture><\/div>\n<div class=\"relative hash grid grid-area-1-1 h-[1em] border-0 opacity-0 group-hover\/hash:opacity-[0] group-focus\/hash:opacity-[0] md:group-hover\/hash:md:opacity-[1] md:group-focus\/hash:md:opacity-[1] -ml-6 pr-2\"><\/div>\n<div class=\"flex-1 z-[1] max-w-full break-words text-start justify-self-start leading-snug\">docker\u955c\u50cf\u7f16\u8bd1kubernetes<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u6211\u4eec\u8fd9\u91cc\u4e0b\u8f7d\u7684\u662f\u6700\u65b0\u7684\u6e90\u7801\uff0c\u5982\u679c\u62c9\u53d6\u4e0d\u5230\u56fd\u5916\u955c\u50cf\uff0c\u53ef\u4ee5\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u62c9\u53d6\u955c\u50cf\u7136\u540e\u4e0a\u4f20\u5230\u672c\u5730\u673a\u5668<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abRa538ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker pull mirrorgooglecontainers\/pause-amd64:3.1\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker pull zhuyuhua\/kube-cross:v1.15.2-1\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker pull mirrorgooglecontainers\/debian-base-amd64:0.4.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker pull mirrorgooglecontainers\/debian-iptables-amd64:v11.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker pull mirrorgooglecontainers\/debian-hyperkube-base-amd64:0.12.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker pull litmuschaos\/go-runner:latest\r\n<\/span><\/span>\r\n<span class=\"highlight-line\"><span class=\"highlight-line-content\">docker tag mirrorgooglecontainers\/pause-amd64:3.1 k8s.gcr.io\/build-image\/pause-amd64:3.1\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker tag zhuyuhua\/kube-cross:v1.15.2-1 k8s.gcr.io\/build-image\/kube-cross:v1.15.2-1\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker tag mirrorgooglecontainers\/debian-base-amd64:0.4.0 k8s.gcr.io\/build-image\/debian-base-amd64:0.4.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker tag mirrorgooglecontainers\/debian-iptables-amd64:v11.0 k8s.gcr.io\/build-image\/debian-iptables:buster-v1.3.0 \r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker tag mirrorgooglecontainers\/debian-hyperkube-base-amd64:0.12.0 k8s.gcr.io\/build-image\/debian-hyperkube-base-amd64:0.12.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">docker tag litmuschaos\/go-runner:latest k8s.gcr.io\/build-image\/go-runner:buster-v2.0.1<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u4e3a\u4e86\u9632\u6b62\u4ece\u8fdc\u7a0b\u62c9\u53d6\u955c\u50cf\uff0c\u6211\u4eec\u53ef\u4ee5\u4fee\u6539\u4e0b$GOPATH\\src\\k8s.io\\kubernetes\\build\\lib\\release.sh\u7684\u914d\u7f6e<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abRal38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">\"${DOCKER[@]}\" build ${docker_build_opts:+\"${docker_build_opts}\"} -q -t \"${docker_image_tag}\" \"${docker_build_path}\" &gt;\/dev\/null\r\n<\/span><\/span>\r\n<span class=\"highlight-line\"><span class=\"highlight-line-content\">\u6539\u6210\u5982\u4e0b\r\n<\/span><\/span>\r\n<span class=\"highlight-line\"><span class=\"highlight-line-content\">\"${DOCKER[@]}\" build -q -t \"${docker_image_tag}\" \"${docker_build_path}\" &gt;\/dev\/null<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u7136\u540e\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u6253\u5305<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abRb538ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-3-centos kubernetes]# KUBE_GIT_VERSION=v1.19.0-alpha.0 KUBE_FASTBUILD=true KUBE_BUILD_PULL_LATEST_IMAGES=n make release-images\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:20:07] Verifying Prerequisites....\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:20:07] Building Docker image kube-build:build-a3ee5ddec9-5-v1.15.2-1\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:20:10] Syncing sources to container\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:20:13] Running build command...\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:01] Building go targets for linux\/amd64:\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-apiserver\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-controller-manager\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-scheduler\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kube-proxy\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    vendor\/github.com\/onsi\/ginkgo\/ginkgo\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    test\/e2e\/e2e.test\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cluster\/images\/conformance\/go-runner\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">    cmd\/kubectl\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:42] Syncing out of container\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:51] Building images: linux-amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:51] Starting docker build for image: kube-apiserver-amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:51] Starting docker build for image: kube-controller-manager-amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:51] Starting docker build for image: kube-scheduler-amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:51] Starting docker build for image: kube-proxy-amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:21:51] Building conformance image for arch: amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:22:26] Deleting docker image k8s.gcr.io\/kube-proxy-amd64:v1.19.0-alpha.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:22:30] Deleting docker image k8s.gcr.io\/kube-scheduler-amd64:v1.19.0-alpha.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:22:37] Deleting docker image k8s.gcr.io\/kube-apiserver-amd64:v1.19.0-alpha.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:22:37] Deleting docker image k8s.gcr.io\/kube-controller-manager-amd64:v1.19.0-alpha.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:22:51] Deleting conformance image k8s.gcr.io\/conformance-amd64:v1.19.0-alpha.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">+++ [1123 17:22:51] Docker builds done<\/span><\/span><\/code><\/pre>\n<\/div>\n<p class=\"mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-api-block:ml-0 text-start justify-self-start\">\u7f16\u8bd1\u5b8c\u6210\u540e,\u53ef\u4ee5\u5230\u5bf9\u5e94\u7684\u76ee\u5f55\u4e0b\u67e5\u627e\u955c\u50cf\uff0c\u5e76\u901a\u8fc7docker load &lt; <i class=\"font-italic\">*<\/i> \u6765\u52a0\u8f7d\u955c\u50cf,\u7136\u540e\u901a\u8fc7\u4fee\u6539\u7ec4\u4ef6\u7684yaml\u7684\u955c\u50cf\u540d\u79f0\u5373\u53ef\u3002<\/p>\n<div class=\"group\/codeblock grid grid-flow-col mx-auto page-width-wide:mx-0 w-full decoration-primary\/6 max-w-3xl page-width-wide:max-w-screen-2xl page-api-block:ml-0\" aria-busy=\"false\">\n<div class=\"flex items-center justify-start gap-2 text-sm [grid-area:1\/1]\"><\/div>\n<pre class=\"relative overflow-auto border border-tint-subtle bg-tint-subtle theme-muted:bg-tint-base p-2 [grid-area:2\/1] contrast-more:border-tint contrast-more:bg-tint-base [html.theme-bold.sidebar-filled_&amp;]:bg-tint-base rounded-md straight-corners:rounded-sm shadow-sm\"><code id=\"\u00abRbl38ut1letrnb\u00bb\" class=\"inline-grid min-w-full grid-cols-[auto_1fr] [count-reset:line] print:whitespace-pre-wrap\"><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-3-centos amd64]# ll\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">total 2101008\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw-r--r-- 1 root root 298798080 Nov 23 17:22 conformance-amd64.tar\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw------- 2 root root 619204608 Nov 23 17:22 kube-apiserver.tar\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw------- 2 root root 612844544 Nov 23 17:22 kube-controller-manager.tar\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw------- 2 root root 103392256 Nov 23 17:22 kube-proxy.tar\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">-rw------- 2 root root 517171712 Nov 23 17:22 kube-scheduler.tar\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-3-centos amd64]# pwd\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">\/root\/go\/src\/k8s.io\/kubernetes\/_output\/release-images\/amd64\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-3-centos amd64]# docker load &lt; kube-apiserver.tar\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">5eebc1b5676b: Loading layer [==================================================&gt;]  163.4MB\/163.4MB\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">Loaded image: k8s.gcr.io\/kube-apiserver-amd64:v1.19.0-alpha.0\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">[root@VM-0-3-centos amd64]# docker images|grep apis\r\n<\/span><\/span><span class=\"highlight-line\"><span class=\"highlight-line-content\">k8s.gcr.io\/kube-apiserver-amd64                            v1.19.0-alpha.0                c1<\/span><\/span><\/code><\/pre>\n<\/div>\n<\/div>\n<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/docs.niewx.cn\/20201111-ru-he-yue-du-k8s-yuan-ma<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u9605\u8bfbk8s\u6e90\u7801 \u672c\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728windows\u4e0b\u901a\u8fc7goland\u9605\u8bfbk8s\u6e90\u7801\u3002 \u4e0b\u8f7d\u53caidea\u52a0 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/11601"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11601"}],"version-history":[{"count":1,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/11601\/revisions"}],"predecessor-version":[{"id":11602,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/11601\/revisions\/11602"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}