doc: describe how to run conformance tests with kind
Signed-off-by: knight42 <anonymousknight96@gmail.com>
This commit is contained in:
parent
e08b0e8cc7
commit
1cf544cb29
|
|
@ -169,7 +169,7 @@ with the following versions must pass conformance tests built from the
|
|||
following branches:
|
||||
|
||||
| cluster version | master | release-1.3 | release-1.2 | release-1.1 |
|
||||
| --------------- | ----- | ----------- | ----------- | ----------- |
|
||||
| --------------- | ------ | ----------- | ----------- | ----------- |
|
||||
| v1.3.0-alpha | yes | yes | yes | no |
|
||||
| v1.2.x | no | no | yes | yes |
|
||||
| v1.1.x | no | no | no | yes |
|
||||
|
|
@ -181,6 +181,69 @@ configured. Conformance tests must be able to be run against clusters that have
|
|||
not been created with `test-infra/kubetest`, just provide a kubeconfig with the
|
||||
appropriate endpoint and credentials.
|
||||
|
||||
### Running Conformance Tests With [KinD](https://kind.sigs.k8s.io/)
|
||||
|
||||
1. Work in your kubernetes branch, preferably in the default go src location: `$GOPATH/src/k8s.io/kubernetes`
|
||||
|
||||
2. Create your kind node image:
|
||||
|
||||
```sh
|
||||
# Without bazel
|
||||
kind build node-image
|
||||
|
||||
# Or with bazel
|
||||
kind build node-image --type bazel
|
||||
```
|
||||
|
||||
3. Create your kind e2e cluster config kind-config-yaml:
|
||||
|
||||
```yaml
|
||||
# necessary for conformance
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
networking:
|
||||
ipFamily: ipv4
|
||||
nodes:
|
||||
# the control plane node
|
||||
- role: control-plane
|
||||
- role: worker
|
||||
- role: worker
|
||||
```
|
||||
|
||||
4. Set your KUBECONFIG env variable (KIND generates the conf based on it):
|
||||
|
||||
```sh
|
||||
export KUBECONFIG="${HOME}/.kube/kind-test-config"
|
||||
```
|
||||
|
||||
5. Use the previous config to create your cluster:
|
||||
|
||||
```sh
|
||||
kind create cluster --config kind-config.yaml --image kindest/node:latest -v4
|
||||
```
|
||||
|
||||
6. Create your e2e Kubernetes binary (from your Kubernetes src code):
|
||||
|
||||
```sh
|
||||
# Without bazel
|
||||
make WHAT="test/e2e/e2e.test"
|
||||
|
||||
# Or with bazel
|
||||
bazel build //test/e2e:e2e.test
|
||||
```
|
||||
|
||||
7. Execute your tests:
|
||||
|
||||
```sh
|
||||
# Without bazel
|
||||
./_output/bin/e2e.test -context kind-kind -ginkgo.focus="\[sig-network\].*Conformance" -num-nodes 2
|
||||
|
||||
# Or with bazel
|
||||
./bazel-bin/test/e2e/e2e.test -context kind-kind -ginkgo.focus="\[sig-network\].*Conformance" -num-nodes 2
|
||||
```
|
||||
|
||||
### Running Conformance Tests With kubetest
|
||||
|
||||
These commands are intended to be run within a kubernetes directory, either
|
||||
cloned from source, or extracted from release artifacts such as
|
||||
`kubernetes.tar.gz`. They assume you have a valid golang installation.
|
||||
|
|
|
|||
Loading…
Reference in New Issue