gpt4 book ai didi

go - 如何在Kubernetes中执行Master Go脚本

转载 作者:行者123 更新时间:2023-12-01 22:26:01 25 4
gpt4 key购买 nike

我们在下面的URL中找到了测试列表。任何人都可以让我知道主要的go脚本来执行端到端kubernetes测试的测试列表。
https://github.com/kubernetes/kubernetes/tree/master/test/e2e

我们已经在Ubuntu中安装了kubernetes,并试图获取执行所有e2e测试的主脚本。

我在安装kubetest时遇到问题。请帮我解决问题。完整的信息如下。

chan@coe-OptiPlex-3060:~$ sudo go get -v -u k8s.io/test-infra/kubetest
Fetching https://k8s.io/test-infra/kubetest?go-get=1
Parsing meta tags from https://k8s.io/test-infra/kubetest?go-get=1 (status code 200)
get "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
get "k8s.io/test-infra/kubetest": verifying non-authoritative meta tag
Fetching https://k8s.io/test-infra?go-get=1
Parsing meta tags from https://k8s.io/test-infra?go-get=1 (status code 200)
k8s.io/test-infra (download)
github.com/Azure/azure-sdk-for-go (download)
github.com/Azure/go-autorest (download)
github.com/dgrijalva/jwt-go (download)
github.com/Azure/azure-storage-blob-go (download)
github.com/Azure/azure-pipeline-go (download)
github.com/mattn/go-ieproxy (download)
github.com/aws/aws-k8s-tester (download)
package github.com/aws/aws-k8s-tester/ekstester: cannot find package "github.com/aws/aws-k8s-tester/ekstester" in any of:
/usr/lib/go-1.10/src/github.com/aws/aws-k8s-tester/ekstester (from $GOROOT)
/home/coe/go/src/github.com/aws/aws-k8s-tester/ekstester (from $GOPATH)
github.com/aws/aws-sdk-go (download)
github.com/docker/docker (download)
github.com/pelletier/go-toml (download)
github.com/satori/go.uuid (download)
github.com/spf13/pflag (download)
Fetching https://golang.org/x/crypto/ssh?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/ssh": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://golang.org/x/crypto/chacha20?go-get=1
Parsing meta tags from https://golang.org/x/crypto/chacha20?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/chacha20": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/internal/subtle?go-get=1
Parsing meta tags from https://golang.org/x/crypto/internal/subtle?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/internal/subtle": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/curve25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/curve25519?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/curve25519": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/ed25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ed25519?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/ed25519": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/ed25519/internal/edwards25519?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ed25519/internal/edwards25519?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/ed25519/internal/edwards25519": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/poly1305?go-get=1
Parsing meta tags from https://golang.org/x/crypto/poly1305?go-get=1 (status code 200)
get "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
get "golang.org/x/crypto/poly1305": verifying non-authoritative meta tag
Fetching https://k8s.io/client-go/kubernetes?go-get=1
Parsing meta tags from https://k8s.io/client-go/kubernetes?go-get=1 (status code 200)
get "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
get "k8s.io/client-go/kubernetes": verifying non-authoritative meta tag
Fetching https://k8s.io/client-go?go-get=1
Parsing meta tags from https://k8s.io/client-go?go-get=1 (status code 200)
k8s.io/client-go (download)
Fetching https://k8s.io/client-go/discovery?go-get=1
Parsing meta tags from https://k8s.io/client-go/discovery?go-get=1 (status code 200)
get "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
get "k8s.io/client-go/discovery": verifying non-authoritative meta tag
github.com/golang/protobuf (download)
github.com/googleapis/gnostic (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "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
gopkg.in/yaml.v2 (download)
Fetching https://k8s.io/apimachinery/pkg/api/errors?go-get=1
Parsing meta tags from https://k8s.io/apimachinery/pkg/api/errors?go-get=1 (status code 200)
get "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
get "k8s.io/apimachinery/pkg/api/errors": verifying non-authoritative meta tag
Fetching https://k8s.io/apimachinery?go-get=1
Parsing meta tags from https://k8s.io/apimachinery?go-get=1 (status code 200)
k8s.io/apimachinery (download)
Fetching https://k8s.io/apimachinery/pkg/apis/meta/v1?go-get=1
Parsing meta tags from https://k8s.io/apimachinery/pkg/apis/meta/v1?go-get=1 (status code 200)
get "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

..
..
解析 https://k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1?go-get=1中的元标记(状态码200)
..
..
Fetching https://k8s.io/test-infra/kubetest/process?go-get=1
Parsing meta tags from https://k8s.io/test-infra/kubetest/process?go-get=1 (status code 200)
get "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
get "k8s.io/test-infra/kubetest/process": verifying non-authoritative meta tag
Fetching https://k8s.io/test-infra/kubetest/util?go-get=1
Parsing meta tags from https://k8s.io/test-infra/kubetest/util?go-get=1 (status code 200)
get "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
get "k8s.io/test-infra/kubetest/util": verifying non-authoritative meta tag
Fetching https://k8s.io/test-infra/kubetest/kind?go-get=1
Parsing meta tags from https://k8s.io/test-infra/kubetest/kind?go-get=1 (status code 200)
get "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
get "k8s.io/test-infra/kubetest/kind": verifying non-authoritative meta tag
Fetching https://k8s.io/test-infra/kubetest/kubeadmdind?go-get=1
Parsing meta tags from https://k8s.io/test-infra/kubetest/kubeadmdind?go-get=1 (status code 200)
get "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
get "k8s.io/test-infra/kubetest/kubeadmdind": verifying non-authoritative meta tag

chan @ coe-OptiPlex-3060:〜$ kubetest --extract = v1.13.0
kubetest:找不到命令

最佳答案

请遵循以下步骤:

安装Go

wget https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz

sudo tar -C /usr/local -xzf go1.12.1.linux-amd64.tar.gz
export GOPATH="/home/vagrant/go"
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

安装kubetest
go get -v -u k8s.io/test-infra/kubetest

提取版本
kubetest --extract=v1.13.0

cd kubernetes

针对本地集群进行测试
export KUBECONFIG=/path/to/kubeconfig
export KUBE_MASTER_IP="http://127.0.0.1:<PORT>"
export KUBE_MASTER_IP="127.0.0.1:<PORT>"
export KUBE_MASTER=local



kubetest --test --provider=skeleton --test_args="--ginkgo.focus=\[Conformance\]" | tee test.out

关于go - 如何在Kubernetes中执行Master Go脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59929119/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com