{"id":208127,"date":"2025-07-08T13:21:37","date_gmt":"2025-07-08T05:21:37","guid":{"rendered":"https:\/\/server.hk\/cnblog\/208127\/"},"modified":"2025-07-08T13:21:37","modified_gmt":"2025-07-08T05:21:37","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8kubernetes%e4%b8%ad%e6%89%a7%e8%a1%8cmaster-go-script","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/208127\/","title":{"rendered":"\u5982\u4f55\u5728kubernetes\u4e2d\u6267\u884cmaster go script"},"content":{"rendered":"<p><b><\/b> <\/p>\n<p>\u5f53\u524d\u4f4d\u7f6e\uff1a <span>&gt;<\/span> <span>&gt;<\/span> <span>&gt;<\/span> <span>&gt;<\/span> <span>\u5982\u4f55\u5728kubernetes\u4e2d\u6267\u884cmaster go script<\/span><\/p>\n<p><span>\u6765\u6e90\uff1astackoverflow<\/span><br \/>\n<span>2024-04-29 11:42:37<\/span><br \/>\n<span><i><\/i>0\u6d4f\u89c8<\/span><br \/>\n<span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u600e\u4e48\u5165\u95e8Golang\u7f16\u7a0b\uff1f\u9700\u8981\u5b66\u4e60\u54ea\u4e9b\u77e5\u8bc6\u70b9\uff1f\u8fd9\u662f\u65b0\u624b\u4eec\u521a\u63a5\u89e6\u7f16\u7a0b\u65f6\u5e38\u89c1\u7684\u95ee\u9898\uff1b\u4e0b\u9762\u5c31\u6765\u7ed9\u5927\u5bb6\u6574\u7406\u5206\u4eab\u4e00\u4e9b\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u80fd\u591f\u7ed9\u521d\u5b66\u8005\u4e00\u4e9b\u5e2e\u52a9\u3002\u672c\u7bc7\u6587\u7ae0\u5c31\u6765\u4ecb\u7ecd\u300a\u5982\u4f55\u5728kubernetes\u4e2d\u6267\u884cmaster go script\u300b\uff0c\u6d89\u53ca\u5230\uff0c\u6709\u9700\u8981\u7684\u53ef\u4ee5\u6536\u85cf\u4e00\u4e0b<\/p>\n<p> \u95ee\u9898\u5185\u5bb9<br \/>\n <\/p>\n<p>\u6211\u4eec\u5728\u4ee5\u4e0b url \u4e2d\u627e\u5230\u4e86\u6d4b\u8bd5\u5217\u8868\u3002\u8c01\u80fd\u544a\u8bc9\u6211\u6267\u884c\u7aef\u5230\u7aef kubernetes \u6d4b\u8bd5\u7684\u6d4b\u8bd5\u5217\u8868\u7684\u4e3b\u8981 go \u811a\u672c\u3002 https:\/\/github.com\/kubernetes\/kubernetes\/tree\/master\/test\/e2e<\/p>\n<p>\u6211\u4eec\u5df2\u7ecf\u5728 ubuntu \u4e2d\u5b89\u88c5\u4e86 kubernetes\uff0c\u5e76\u5c1d\u8bd5\u83b7\u53d6\u6267\u884c\u6240\u6709 e2e \u6d4b\u8bd5\u7684\u4e3b\u811a\u672c\u3002<\/p>\n<p>\u6211\u5728\u5b89\u88c5 kubetest \u65f6\u9047\u5230\u95ee\u9898\u3002\u8bf7\u5e2e\u6211\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u5b8c\u6574\u4fe1\u606f\u5982\u4e0b\u3002 <\/p>\n<pre>chan@coe-optiplex-3060:~$ sudo go get -v -u k8s.io\/test-infra\/kubetest\nfetching https:\/\/k8s.io\/test-infra\/kubetest?go-get=1\nparsing meta tags from https:\/\/k8s.io\/test-infra\/kubetest?go-get=1 (status code 200)\nget \"k8s.io\/test-infra\/kubetest\": found meta tag get.metaimport{prefix:\"k8s.io\/test-infra\", vcs:\"git\", reporoot:\"https:\/\/github.com\/kubernetes\/test-infra\"} at https:\/\/k8s.io\/test-infra\/kubetest?go-get=1\nget \"k8s.io\/test-infra\/kubetest\": verifying non-authoritative meta tag\nfetching https:\/\/k8s.io\/test-infra?go-get=1\nparsing meta tags from https:\/\/k8s.io\/test-infra?go-get=1 (status code 200)\nk8s.io\/test-infra (download)\ngithub.com\/azure\/azure-sdk-for-go (download)\ngithub.com\/azure\/go-autorest (download)\ngithub.com\/dgrijalva\/jwt-go (download)\ngithub.com\/azure\/azure-storage-blob-go (download)\ngithub.com\/azure\/azure-pipeline-go (download)\ngithub.com\/mattn\/go-ieproxy (download)\ngithub.com\/aws\/aws-k8s-tester (download)\npackage github.com\/aws\/aws-k8s-tester\/ekstester: cannot find package \"github.com\/aws\/aws-k8s-tester\/ekstester\" in any of:\n    \/usr\/lib\/go-1.10\/src\/github.com\/aws\/aws-k8s-tester\/ekstester (from $goroot)\n    \/home\/coe\/go\/src\/github.com\/aws\/aws-k8s-tester\/ekstester (from $gopath)\ngithub.com\/aws\/aws-sdk-go (download)\ngithub.com\/docker\/docker (download)\ngithub.com\/pelletier\/go-toml (download)\ngithub.com\/satori\/go.uuid (download)\ngithub.com\/spf13\/pflag (download)\nfetching https:\/\/golang.org\/x\/crypto\/ssh?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/ssh?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/ssh\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/ssh?go-get=1\nget \"golang.org\/x\/crypto\/ssh\": verifying non-authoritative meta tag\nfetching https:\/\/golang.org\/x\/crypto?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto?go-get=1 (status code 200)\ngolang.org\/x\/crypto (download)\nfetching https:\/\/golang.org\/x\/crypto\/chacha20?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/chacha20?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/chacha20\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/chacha20?go-get=1\nget \"golang.org\/x\/crypto\/chacha20\": verifying non-authoritative meta tag\nfetching https:\/\/golang.org\/x\/crypto\/internal\/subtle?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/internal\/subtle?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/internal\/subtle\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/internal\/subtle?go-get=1\nget \"golang.org\/x\/crypto\/internal\/subtle\": verifying non-authoritative meta tag\nfetching https:\/\/golang.org\/x\/crypto\/curve25519?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/curve25519?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/curve25519\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/curve25519?go-get=1\nget \"golang.org\/x\/crypto\/curve25519\": verifying non-authoritative meta tag\nfetching https:\/\/golang.org\/x\/crypto\/ed25519?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/ed25519?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/ed25519\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/ed25519?go-get=1\nget \"golang.org\/x\/crypto\/ed25519\": verifying non-authoritative meta tag\nfetching https:\/\/golang.org\/x\/crypto\/ed25519\/internal\/edwards25519?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/ed25519\/internal\/edwards25519?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/ed25519\/internal\/edwards25519\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/ed25519\/internal\/edwards25519?go-get=1\nget \"golang.org\/x\/crypto\/ed25519\/internal\/edwards25519\": verifying non-authoritative meta tag\nfetching https:\/\/golang.org\/x\/crypto\/poly1305?go-get=1\nparsing meta tags from https:\/\/golang.org\/x\/crypto\/poly1305?go-get=1 (status code 200)\nget \"golang.org\/x\/crypto\/poly1305\": found meta tag get.metaimport{prefix:\"golang.org\/x\/crypto\", vcs:\"git\", reporoot:\"https:\/\/go.googlesource.com\/crypto\"} at https:\/\/golang.org\/x\/crypto\/poly1305?go-get=1\nget \"golang.org\/x\/crypto\/poly1305\": verifying non-authoritative meta tag\nfetching https:\/\/k8s.io\/client-go\/kubernetes?go-get=1\nparsing meta tags from https:\/\/k8s.io\/client-go\/kubernetes?go-get=1 (status code 200)\nget \"k8s.io\/client-go\/kubernetes\": found meta tag get.metaimport{prefix:\"k8s.io\/client-go\", vcs:\"git\", reporoot:\"https:\/\/github.com\/kubernetes\/client-go\"} at https:\/\/k8s.io\/client-go\/kubernetes?go-get=1\nget \"k8s.io\/client-go\/kubernetes\": verifying non-authoritative meta tag\nfetching https:\/\/k8s.io\/client-go?go-get=1\nparsing meta tags from https:\/\/k8s.io\/client-go?go-get=1 (status code 200)\nk8s.io\/client-go (download)\nfetching https:\/\/k8s.io\/client-go\/discovery?go-get=1\nparsing meta tags from https:\/\/k8s.io\/client-go\/discovery?go-get=1 (status code 200)\nget \"k8s.io\/client-go\/discovery\": found meta tag get.metaimport{prefix:\"k8s.io\/client-go\", vcs:\"git\", reporoot:\"https:\/\/github.com\/kubernetes\/client-go\"} at https:\/\/k8s.io\/client-go\/discovery?go-get=1\nget \"k8s.io\/client-go\/discovery\": verifying non-authoritative meta tag\ngithub.com\/golang\/protobuf (download)\ngithub.com\/googleapis\/gnostic (download)\nfetching https:\/\/gopkg.in\/yaml.v2?go-get=1\nparsing meta tags from https:\/\/gopkg.in\/yaml.v2?go-get=1 (status code 200)\nget \"gopkg.in\/yaml.v2\": found meta tag get.metaimport{prefix:\"gopkg.in\/yaml.v2\", vcs:\"git\", reporoot:\"https:\/\/gopkg.in\/yaml.v2\"} at https:\/\/gopkg.in\/yaml.v2?go-get=1\ngopkg.in\/yaml.v2 (download)\nfetching https:\/\/k8s.io\/apimachinery\/pkg\/api\/errors?go-get=1\nparsing meta tags from https:\/\/k8s.io\/apimachinery\/pkg\/api\/errors?go-get=1 (status code 200)\nget \"k8s.io\/apimachinery\/pkg\/api\/errors\": found meta tag get.metaimport{prefix:\"k8s.io\/apimachinery\", vcs:\"git\", reporoot:\"https:\/\/github.com\/kubernetes\/apimachinery\"} at https:\/\/k8s.io\/apimachinery\/pkg\/api\/errors?go-get=1\nget \"k8s.io\/apimachinery\/pkg\/api\/errors\": verifying non-authoritative meta tag\nfetching https:\/\/k8s.io\/apimachinery?go-get=1\nparsing meta tags from https:\/\/k8s.io\/apimachinery?go-get=1 (status code 200)\nk8s.io\/apimachinery (download)\nfetching https:\/\/k8s.io\/apimachinery\/pkg\/apis\/meta\/v1?go-get=1\nparsing meta tags from https:\/\/k8s.io\/apimachinery\/pkg\/apis\/meta\/v1?go-get=1 (status code 200)\nget \"k8s.io\/apimachinery\/pkg\/apis\/meta\/v1\": found meta tag get.metaimport{prefix:\"k8s.io\/apimachinery\", vcs:\"git\", reporoot:\"https:\/\/github.com\/kubernetes\/apimachinery\"} at https:\/\/k8s.io\/apimachinery\/pkg\/apis\/meta\/v1?go-get=1<\/pre>\n<p>.. .. \u89e3\u6790\u6765\u81ea https:\/\/k8s.io\/client-go\/pkg\/apis\/clientauthentication\/v1alpha1?go-get=1 \u7684\u5143\u6807\u8bb0\uff08\u72b6\u6001\u4ee3\u7801 200\uff09 .. ..<\/p>\n<pre>Fetching https:\/\/k8s.io\/test-infra\/kubetest\/process?go-get=1\nParsing meta tags from https:\/\/k8s.io\/test-infra\/kubetest\/process?go-get=1 (status code 200)\nget \"k8s.io\/test-infra\/kubetest\/process\": found meta tag get.metaImport{Prefix:\"k8s.io\/test-infra\", VCS:\"git\", RepoRoot:\"https:\/\/github.com\/kubernetes\/test-infra\"} at https:\/\/k8s.io\/test-infra\/kubetest\/process?go-get=1\nget \"k8s.io\/test-infra\/kubetest\/process\": verifying non-authoritative meta tag\nFetching https:\/\/k8s.io\/test-infra\/kubetest\/util?go-get=1\nParsing meta tags from https:\/\/k8s.io\/test-infra\/kubetest\/util?go-get=1 (status code 200)\nget \"k8s.io\/test-infra\/kubetest\/util\": found meta tag get.metaImport{Prefix:\"k8s.io\/test-infra\", VCS:\"git\", RepoRoot:\"https:\/\/github.com\/kubernetes\/test-infra\"} at https:\/\/k8s.io\/test-infra\/kubetest\/util?go-get=1\nget \"k8s.io\/test-infra\/kubetest\/util\": verifying non-authoritative meta tag\nFetching https:\/\/k8s.io\/test-infra\/kubetest\/kind?go-get=1\nParsing meta tags from https:\/\/k8s.io\/test-infra\/kubetest\/kind?go-get=1 (status code 200)\nget \"k8s.io\/test-infra\/kubetest\/kind\": found meta tag get.metaImport{Prefix:\"k8s.io\/test-infra\", VCS:\"git\", RepoRoot:\"https:\/\/github.com\/kubernetes\/test-infra\"} at https:\/\/k8s.io\/test-infra\/kubetest\/kind?go-get=1\nget \"k8s.io\/test-infra\/kubetest\/kind\": verifying non-authoritative meta tag\nFetching https:\/\/k8s.io\/test-infra\/kubetest\/kubeadmdind?go-get=1\nParsing meta tags from https:\/\/k8s.io\/test-infra\/kubetest\/kubeadmdind?go-get=1 (status code 200)\nget \"k8s.io\/test-infra\/kubetest\/kubeadmdind\": found meta tag get.metaImport{Prefix:\"k8s.io\/test-infra\", VCS:\"git\", RepoRoot:\"https:\/\/github.com\/kubernetes\/test-infra\"} at https:\/\/k8s.io\/test-infra\/kubetest\/kubeadmdind?go-get=1\nget \"k8s.io\/test-infra\/kubetest\/kubeadmdind\": verifying non-authoritative meta tag<\/pre>\n<p>chan@coe-optiplex-3060:~$ kubetest &#8211;extract=v1.13.0 kubetest\uff1a\u627e\u4e0d\u5230\u547d\u4ee4<\/p>\n<p> <\/p>\n<h2>\u89e3\u51b3\u65b9\u6848<\/h2>\n<p> <\/p>\n<p>\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<h2>\u5b89\u88c5go<\/h2>\n<pre>wget https:\/\/dl.google.com\/go\/go1.12.1.linux-amd64.tar.gz\n\nsudo tar -c \/usr\/local -xzf go1.12.1.linux-amd64.tar.gz\nexport gopath=\"\/home\/vagrant\/go\"\nexport path=$path:\/usr\/local\/go\/bin:$gopath\/bin<\/pre>\n<h2>\u5b89\u88c5 kubetest<\/h2>\n<pre>go get -v -u k8s.io\/test-infra\/kubetest<\/pre>\n<h2>\u63d0\u53d6\u7248\u672c<\/h2>\n<pre>kubetest --extract=v1.13.0\n\ncd kubernetes<\/pre>\n<h2>\u9488\u5bf9\u672c\u5730\u96c6\u7fa4\u8fdb\u884c\u6d4b\u8bd5<\/h2>\n<pre>export KUBECONFIG=\/path\/to\/kubeconfig\nexport KUBE_MASTER_IP=\"http:\/\/127.0.0.1:&lt;PORT&gt;\"\nexport KUBE_MASTER_IP=\"127.0.0.1:&lt;PORT&gt;\"\nexport KUBE_MASTER=local\n\n\n\nkubetest --test --provider=skeleton --test_args=\"--ginkgo.focus=\\[Conformance\\]\" | tee test.out<\/pre>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300a\u5982\u4f55\u5728kubernetes\u4e2d\u6267\u884cmaster go script\u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591aGolang\u77e5\u8bc6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u524d\u4f4d\u7f6e\uff1a &gt; &gt; &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-208127","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/208127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=208127"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/208127\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=208127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=208127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=208127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}