@@ -213,9 +213,22 @@ for database debugging.
213
213
以上所有命令都应该有效。输出应该类似于:
214
214
215
215
```
216
- I0710 14:43:38.274550 3655 portforward.go:225] Forwarding from 127.0.0.1:7000 -> 6379
217
- I0710 14:43:38.274797 3655 portforward.go:225] Forwarding from [::1]:7000 -> 6379
216
+ Forwarding from 127.0.0.1:7000 -> 6379
217
+ Forwarding from [::1]:7000 -> 6379
218
218
```
219
+ <!--
220
+ {{< note >}}
221
+
222
+ `kubectl port-forward` does not return. To continue with the exercises, you will need to open another terminal.
223
+
224
+ {{< /note >}}
225
+ -->
226
+ {{< note >}}
227
+
228
+ ` kubectl port-forward ` 不会返回。你需要打开另一个终端来继续这个练习。
229
+
230
+ {{< /note >}}
231
+
219
232
220
233
<!--
221
234
2. Start the Redis command line interface:
@@ -232,13 +245,44 @@ for database debugging.
232
245
3 . 在 Redis 命令行提示符下,输入 ` ping ` 命令:
233
246
234
247
```
235
- 127.0.0.1:7000> ping
248
+ ping
236
249
```
237
250
238
251
<!--
239
- A successful ping request returns PONG.
252
+ A successful ping request returns:
240
253
-->
241
- 成功的 ping 请求应该返回 PONG。
254
+ 成功的 ping 请求应该返回:
255
+
256
+ ```
257
+ PONG
258
+ ```
259
+ <!--
260
+ ### Optionally let _kubectl_ choose the local port {#let-kubectl-choose-local-port}
261
+ -->
262
+ ### (可选操作)让 _ kubectl_ 来选择本地端口 {#let-kubectl-choose-local-port}
263
+
264
+ <!--
265
+ If you don't need a specific local port, you can let `kubectl` choose and allocate
266
+ the local port and thus relieve you from having to manage local port conflicts, with
267
+ the slightly simpler syntax:
268
+ -->
269
+ 如果你不需要指定特定的本地端口,你可以让 ` kubectl ` 来选择和分配本地端口,
270
+ 以便你不需要管理本地端口冲突。该命令使用稍微不同的语法:
271
+
272
+ ``` shell
273
+ kubectl port-forward deployment/redis-master :6379
274
+ ```
275
+ <!--
276
+ The `kubectl` tool finds a local port number that is not in use (avoiding low ports numbers,
277
+ because these might be used by other applications). The output is similar to:
278
+ -->
279
+ ` kubectl ` 工具会找到一个未被使用的本地端口号(避免使用低段位的端口号,因为他们可能会被其他应用程序使用)。输出应该类似于:
280
+
281
+ ```
282
+ Forwarding from 127.0.0.1:62162 -> 6379
283
+ Forwarding from [::1]:62162 -> 6379
284
+ ```
285
+
242
286
243
287
<!-- discussion -->
244
288
0 commit comments