@@ -59,32 +59,38 @@ To run the node conformance test, perform the following steps:
59
59
要运行节点一致性测试,请执行以下步骤:
60
60
61
61
<!--
62
- 1. Point your Kubelet to localhost `--api-servers="http://localhost:8080"`,
63
- because the test framework starts a local master to test Kubelet. There are some
64
- other Kubelet flags you may care:
62
+ 1. Work out the value of the `--kubeconfig` option for the kubelet; for example:
63
+ `--kubeconfig=/var/lib/kubelet/config.yaml`.
64
+ Because the test framework starts a local control plane to test the kubelet,
65
+ use `http://localhost:8080` as the URL of the API server.
66
+ There are some other kubelet command line parameters you may want to use:
65
67
* `--pod-cidr`: If you are using `kubenet`, you should specify an arbitrary CIDR
66
68
to Kubelet, for example `--pod-cidr=10.180.0.0/24`.
67
69
* `--cloud-provider`: If you are using `--cloud-provider=gce`, you should
68
70
remove the flag to run the test.
69
71
-->
70
- 1 . 因为测试框架会启动一个本地的 master 来测试 Kubelet,所以将 Kubelet 指向本机 `--api-servers="http://localhost:8080"。
71
- 还有一些其他 Kubelet 参数可能需要注意:
72
- * ` --pod-cidr ` : 如果使用 ` kubenet ` , 需要为 Kubelet 任意指定一个 CIDR, 例如 ` --pod-cidr=10.180.0.0/24 ` 。
73
- * ` --cloud-provider ` : 如果使用 ` --cloud-provider=gce ` ,需要移除这个参数来运行测试。
72
+ 1 . 得出 kubelet 的 ` --kubeconfig ` 的值;例如:` --kubeconfig=/var/lib/kubelet/config.yaml ` .
73
+ 由于测试框架启动了本地控制平面来测试 kubelet, 因此使用 ` http://localhost:8080 `
74
+ 作为API 服务器的 URL。
75
+ 一些其他的 kubelet 命令行参数可能会被用到:
76
+ * ` --pod-cidr ` : 如果使用 ` kubenet ` , 需要为 Kubelet 任意指定一个 CIDR,
77
+ 例如 ` --pod-cidr=10.180.0.0/24 ` 。
78
+ * ` --cloud-provider ` : 如果使用 ` --cloud-provider=gce ` ,需要移除这个参数
79
+ 来运行测试。
74
80
75
81
76
82
<!--
77
83
2. Run the node conformance test with command:
78
84
-->
79
85
2 . 使用以下命令运行节点一致性测试:
80
86
81
- ``` shell
82
- # $CONFIG_DIR is the pod manifest path of your Kubelet.
83
- # $LOG_DIR is the test output path.
84
- sudo docker run -it --rm --privileged --net=host \
85
- -v /:/rootfs -v $CONFIG_DIR :$CONFIG_DIR -v $LOG_DIR :/var/result \
86
- k8s.gcr.io/node-test:0.2
87
- ```
87
+ ``` shell
88
+ # $CONFIG_DIR 是您 Kubelet 的 pod manifest 路径。
89
+ # $LOG_DIR 是测试的输出路径。
90
+ sudo docker run -it --rm --privileged --net=host \
91
+ -v /:/rootfs -v $CONFIG_DIR :$CONFIG_DIR -v $LOG_DIR :/var/result \
92
+ k8s.gcr.io/node-test:0.2
93
+ ```
88
94
89
95
<!--
90
96
## Running Node Conformance Test for Other Architectures
@@ -96,11 +102,18 @@ Kubernetes also provides node conformance test docker images for other architect
96
102
-->
97
103
Kubernetes 也为其他硬件体系结构的系统提供了节点一致性测试的 Docker 镜像:
98
104
99
- Arch | Image |
100
- --------|:-----------------:|
101
- amd64 | node-test-amd64 |
102
- arm | node-test-arm |
103
- arm64 | node-test-arm64 |
105
+ <!--
106
+ | Arch | Image | |
107
+ | ----- | :-------------: | ---- |
108
+ | amd64 | node-test-amd64 | |
109
+ | arm | node-test-arm | |
110
+ | arm64 | node-test-arm64 | |
111
+ -->
112
+ | 架构 | 镜像 | |
113
+ | ----- | :-------------: | ---- |
114
+ | amd64 | node-test-amd64 | |
115
+ | arm | node-test-arm | |
116
+ | arm64 | node-test-arm64 | |
104
117
105
118
<!--
106
119
## Running Selected Test
@@ -114,22 +127,31 @@ To run specific tests, overwrite the environment variable `FOCUS` with theregula
114
127
115
128
``` shell
116
129
sudo docker run -it --rm --privileged --net=host \
117
- -v /:/rootfs:ro -v $CONFIG_DIR :$CONFIG_DIR -v $LOG_DIR :/var/result \
118
- -e FOCUS=MirrorPod \ # Only run MirrorPod test
119
- k8s.gcr.io/node-test:0.2
130
+ -v /:/rootfs:ro -v $CONFIG_DIR :$CONFIG_DIR -v $LOG_DIR :/var/result \
131
+ -e FOCUS=MirrorPod \ # Only run MirrorPod test
132
+ k8s.gcr.io/node-test:0.2
120
133
```
121
134
122
135
<!--
123
136
To skip specific tests, overwrite the environment variable `SKIP` with theregular expression of tests you want to skip.
124
137
-->
125
138
要跳过特定的测试,请使用您希望跳过的测试的常规表达式覆盖环境变量 ` SKIP ` 。
126
139
140
+ <!--
127
141
```shell
128
142
sudo docker run -it --rm --privileged --net=host \
129
143
-v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
130
144
-e SKIP=MirrorPod \ # Run all conformance tests but skip MirrorPod test
131
- k8s.gcr.io/node-test:0.2
145
+ k8s.gcr.io/node-test:0.2
132
146
```
147
+ -->
148
+ ``` shell
149
+ sudo docker run -it --rm --privileged --net=host \
150
+ -v /:/rootfs:ro -v $CONFIG_DIR :$CONFIG_DIR -v $LOG_DIR :/var/result \
151
+ -e SKIP=MirrorPod \ # 运行除 MirrorPod 测试外的所有一致性测试内容
152
+ k8s.gcr.io/node-test:0.2
153
+ ```
154
+
133
155
134
156
<!--
135
157
Node conformance test is a containerized version of [node e2e test](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/devel/e2e-node-tests.md).
@@ -159,4 +181,4 @@ Theoretically, you can run any node e2e test if you configure the container andm
159
181
-->
160
182
161
183
* 测试会在节点上遗留一些 Docker 镜像, 包括节点一致性测试本身的镜像和功能测试相关的镜像。
162
- * 测试会在节点上遗留一些死的容器。这些容器是在功能测试的过程中创建的。
184
+ * 测试会在节点上遗留一些死的容器。这些容器是在功能测试的过程中创建的。
0 commit comments