Set the KubernetesVersion to a or https://
base url, such as https://storage.googleapis.com/kubernetes-release-dev/ci/v1.4.0-alpha.2.677+ea69570f61af8e/
We expect the base url to have bin/linux/amd64
directory containing:
- kubelet
- kubelet.sha1
- kubectl
- kubectl.sha1
- kube-apiserver.docker_tag
- kube-apiserver.tar
- kube-apiserver.tar.sha1
- kube-controller-manager.docker_tag
- kube-controller-manager.tar.sha1
- kube-proxy.docker_tag
- kube-proxy.tar
- kube-proxy.tar.sha1
- kube-scheduler.docker_tag
- kube-scheduler.tar
- kube-scheduler.tar.sha1
Do this with kops edit cluster <clustername>
. The spec should look like
The simple way:
# cd wherever you tend to put git repos
git clone https://github.com/kubernetes/test-infra.git
export KOPS_E2E_STATE_STORE=s3://your-kops-state-store # Change to your state store path
export KOPS_E2E_CLUSTER_NAME=e2e.cluster.name # Change to an FQDN for your e2e cluster name
test-infra/jobs/ci-kubernetes-e2e-kops-aws.sh |& tee /tmp/testlog
This:
- Runs the default series of tests (which the Kubernetes team is ) (see below for how to override the test list)
- Tears down the cluster
- Pipes all output to
/tmp/testlog
This isn’t yet terribly useful, though - it just shows how to replicate theexisting job, but not with your custom code. To test a custom kops
build, youcan do the following:
Then follow the test directions above.
To override the test list for the job, you need to familiar with theginkgo.focus
and ginkgo.skip
flags. Using these flags, you can do:
export GINKGO_TEST_ARGS="--ginkgo.focus=\[Feature:Performance\]"
and follow the instructions above. Here are some other examples from the e2e.go
documentation..
If you want to test against an existing cluster, you can do:
If you want to upload a custom Kubernetes build, here is a simple way (note:this assumes you’ve run make quick-release
in the Kubernetes repo first):
# cd wherever you tend to put git repos
# cd back to your kubernetes repo
/path/to/release/push-build.sh # Fix /path/to/release with wherever you cloned the release repo
That will upload the release to a GCS bucket and make it public. You can thenuse the outputted URL in kops
with --kubernetes-version
.
If you need it private in S3, here’s a manual way:
go run hack/e2e.go -v -up -down -kops `which kops` -kops-cluster test.test-aws.k8s.io -kops-state s3://k8s-kops-state-store/ -kops-nodes=
4 -deployment kops --kops-kubernetes-version https://storage.googleapis.com/kubernetes-release-dev/ci/$(curl -SsL https://storage.googleapis.com/kubernetes-release-dev/ci/latest-green.txt)
(note the v1.6.0-dev
: we insert a kubernetes version so that kops canautomatically detect which k8s version is in use, which it uses to controlflags that are not compatible between versions)
Then: