Skip to content

Commit b25795e

Browse files
authored
Merge pull request #53334 from my-git9/npe-13689
[zh-cn]sync kubectl/kubectl.md
2 parents 095743a + f50cef0 commit b25795e

File tree

1 file changed

+70
-30
lines changed

1 file changed

+70
-30
lines changed

content/zh-cn/docs/reference/kubectl/kubectl.md

Lines changed: 70 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ kubectl [flags]
277277
<td colspan="2">--log-flush-frequency duration&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:5s</td>
278278
</tr>
279279
<tr>
280-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
280+
<td></td>
281+
<td style="line-height: 130%; word-wrap: break-word;">
281282
<!--
282283
Maximum number of seconds between log flushes
283284
-->
@@ -288,7 +289,8 @@ kubectl [flags]
288289
<td colspan="2">--logtostderr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:true</td>
289290
</tr>
290291
<tr>
291-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
292+
<td></td>
293+
<td style="line-height: 130%; word-wrap: break-word;">
292294
<!--
293295
log to standard error instead of files
294296
-->
@@ -299,7 +301,8 @@ kubectl [flags]
299301
<td colspan="2">--match-server-version</td>
300302
</tr>
301303
<tr>
302-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
304+
<td></td>
305+
<td style="line-height: 130%; word-wrap: break-word;">
303306
<!--
304307
Require server version to match client version
305308
-->
@@ -310,7 +313,8 @@ kubectl [flags]
310313
<td colspan="2">-n, --namespace string</td>
311314
</tr>
312315
<tr>
313-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
316+
<td></td>
317+
<td style="line-height: 130%; word-wrap: break-word;">
314318
<!--
315319
If present, the namespace scope for this CLI request
316320
-->
@@ -320,7 +324,8 @@ kubectl [flags]
320324
<td colspan="2">--one-output</td>
321325
</tr>
322326
<tr>
323-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
327+
<td></td>
328+
<td style="line-height: 130%; word-wrap: break-word;">
324329
<!--
325330
If true, only write logs to their native severity level (vs also writing to each lower severity level)
326331
-->
@@ -332,7 +337,8 @@ kubectl [flags]
332337
<td colspan="2">--password string</td>
333338
</tr>
334339
<tr>
335-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
340+
<td></td>
341+
<td style="line-height: 130%; word-wrap: break-word;">
336342
<!--
337343
Password for basic authentication to the API server
338344
-->
@@ -343,7 +349,8 @@ kubectl [flags]
343349
<td colspan="2">--profile string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"none"</td>
344350
</tr>
345351
<tr>
346-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
352+
<td></td>
353+
<td style="line-height: 130%; word-wrap: break-word;">
347354
<!--
348355
Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)
349356
-->
@@ -354,7 +361,8 @@ kubectl [flags]
354361
<td colspan="2">--profile-output string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"profile.pprof"</td>
355362
</tr>
356363
<tr>
357-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
364+
<td></td>
365+
<td style="line-height: 130%; word-wrap: break-word;">
358366
<!--
359367
Name of the file to write the profile to
360368
-->
@@ -365,18 +373,21 @@ kubectl [flags]
365373
<td colspan="2">--request-timeout string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"0"</td>
366374
</tr>
367375
<tr>
368-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
376+
<td></td>
377+
<td style="line-height: 130%; word-wrap: break-word;">
369378
<!--
370379
The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.
371380
-->
372-
放弃单个服务器请求之前的等待时间,非零值需要包含相应时间单位(例如:1s、2m、3h)。零值则表示不做超时要求。
381+
放弃单个服务器请求之前的等待时间,非零值需要包含相应时间单位(例如:1s、2m、3h)。
382+
零值则表示不做超时要求。
373383
</td>
374384
</tr>
375385
<tr>
376386
<td colspan="2">-s, --server string</td>
377387
</tr>
378388
<tr>
379-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
389+
<td></td>
390+
<td style="line-height: 130%; word-wrap: break-word;">
380391
<!--
381392
The address and port of the Kubernetes API server
382393
-->
@@ -387,7 +398,8 @@ kubectl [flags]
387398
<td colspan="2">--skip-headers</td>
388399
</tr>
389400
<tr>
390-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
401+
<td></td>
402+
<td style="line-height: 130%; word-wrap: break-word;">
391403
<!--
392404
If true, avoid header prefixes in the log messages
393405
-->
@@ -398,7 +410,8 @@ kubectl [flags]
398410
<td colspan="2">--skip-log-headers</td>
399411
</tr>
400412
<tr>
401-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
413+
<td></td>
414+
<td style="line-height: 130%; word-wrap: break-word;">
402415
<!--
403416
If true, avoid headers when opening log files
404417
-->
@@ -409,7 +422,8 @@ kubectl [flags]
409422
<td colspan="2">--stderrthreshold severity&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:2</td>
410423
</tr>
411424
<tr>
412-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
425+
<td></td>
426+
<td style="line-height: 130%; word-wrap: break-word;">
413427
<!--
414428
logs at or above this threshold go to stderr
415429
-->
@@ -420,7 +434,8 @@ kubectl [flags]
420434
<td colspan="2">--token string</td>
421435
</tr>
422436
<tr>
423-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
437+
<td></td>
438+
<td style="line-height: 130%; word-wrap: break-word;">
424439
<!--
425440
Bearer token for authentication to the API server
426441
-->
@@ -431,7 +446,8 @@ kubectl [flags]
431446
<td colspan="2">--user string</td>
432447
</tr>
433448
<tr>
434-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
449+
<td></td>
450+
<td style="line-height: 130%; word-wrap: break-word;">
435451
<!--
436452
The name of the kubeconfig user to use
437453
-->
@@ -453,7 +469,8 @@ kubectl [flags]
453469
<td colspan="2">-v, --v Level</td>
454470
</tr>
455471
<tr>
456-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
472+
<td></td>
473+
<td style="line-height: 130%; word-wrap: break-word;">
457474
<!--
458475
number for the log level verbosity
459476
-->
@@ -464,7 +481,8 @@ kubectl [flags]
464481
<td colspan="2">--version version[=true]</td>
465482
</tr>
466483
<tr>
467-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
484+
<td></td>
485+
<td style="line-height: 130%; word-wrap: break-word;">
468486
<!--
469487
Print version information and quit
470488
-->
@@ -475,7 +493,8 @@ kubectl [flags]
475493
<td colspan="2">--vmodule moduleSpec</td>
476494
</tr>
477495
<tr>
478-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
496+
<td></td>
497+
<td style="line-height: 130%; word-wrap: break-word;">
479498
<!--
480499
comma-separated list of pattern=N settings for file-filtered logging
481500
-->
@@ -498,7 +517,8 @@ kubectl [flags]
498517
<td colspan="2">KUBECONFIG</td>
499518
</tr>
500519
<tr>
501-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
520+
<td></td>
521+
<td style="line-height: 130%; word-wrap: break-word;">
502522
<!--
503523
Path to the kubectl configuration ("kubeconfig") file. Default: "$HOME/.kube/config"
504524
-->
@@ -510,49 +530,54 @@ kubectl 的配置 ("kubeconfig") 文件的路径。默认值:"$HOME/.kube/conf
510530
<td colspan="2">KUBECTL_COMMAND_HEADERS</td>
511531
</tr>
512532
<tr>
513-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
533+
<td></td>
534+
<td style="line-height: 130%; word-wrap: break-word;">
514535
<!--
515536
When set to false, turns off extra HTTP headers detailing invoked kubectl command (Kubernetes version v1.22 or later)
516537
-->
517-
设置为 false 时,将关闭额外的 HTTP 标头,不再详细说明被调用的 kubectl 命令(此变量适用于 Kubernetes v1.22 或更高版本)
538+
设置为 false 时,将关闭额外的 HTTP 标头,不再详细说明被调用的 kubectl
539+
命令(此变量适用于 Kubernetes v1.22 或更高版本)
518540
</td>
519541
</tr>
520542

521543
<tr>
522544
<td colspan="2">KUBECTL_EXPLAIN_OPENAPIV3</td>
523545
</tr>
524546
<tr>
525-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
547+
<td></td>
548+
<td style="line-height: 130%; word-wrap: break-word;">
526549
<!--
527550
Toggles whether calls to `kubectl explain` use the new OpenAPIv3 data source available. OpenAPIV3 is enabled by default since Kubernetes 1.24.
528551
-->
529-
切换对 `kubectl explain` 的调用是否使用可用的新 OpenAPIv3 数据源。OpenAPIV3 自 Kubernetes 1.24 起默认被启用。
552+
切换对 <code>kubectl explain</code> 的调用是否使用可用的新 OpenAPIv3 数据源。OpenAPIV3 自 Kubernetes 1.24 起默认被启用。
530553
</td>
531554
</tr>
532555

533556
<tr>
534557
<td colspan="2">KUBECTL_ENABLE_CMD_SHADOW</td>
535558
</tr>
536559
<tr>
537-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
560+
<td></td>
561+
<td style="line-height: 130%; word-wrap: break-word;">
538562
<!--
539563
When set to true, external plugins can be used as subcommands for builtin commands if subcommand does not exist. In alpha stage, this feature can only be used for create command(e.g. kubectl create networkpolicy).
540564
-->
541565
当设置为 true 时,如果子命令不存在,外部插件可以用作内置命令的子命令。
542-
此功能处于 alpha 阶段,只能用于 create 命令(例如 kubectl create networkpolicy)。
566+
此功能处于 alpha 阶段,只能用于 create 命令(例如 <code>kubectl create networkpolicy</code>)。
543567
</td>
544568
</tr>
545569

546570
<tr>
547571
<td colspan="2">KUBECTL_PORT_FORWARD_WEBSOCKETS</td>
548572
</tr>
549573
<tr>
550-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
574+
<td></td>
575+
<td style="line-height: 130%; word-wrap: break-word;">
551576
<!--
552577
When set to true, the kubectl port-forward command will attempt to stream using the websockets protocol.
553578
If the upgrade to websockets fails, the commands will fallback to use the current SPDY protocol.
554579
-->
555-
当设置为 true 时,`kubectl port-forward` 命令将尝试使用 WebSocket 协议进行流式传输。
580+
当设置为 true 时,<code>kubectl port-forward</code> 命令将尝试使用 WebSocket 协议进行流式传输。
556581
如果升级到 WebSocket 失败,命令将回退到使用当前的 SPDY 协议。
557582
</td>
558583
</tr>
@@ -561,7 +586,8 @@ If the upgrade to websockets fails, the commands will fallback to use the curren
561586
<td colspan="2">KUBECTL_REMOTE_COMMAND_WEBSOCKETS</td>
562587
</tr>
563588
<tr>
564-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
589+
<td></td>
590+
<td style="line-height: 130%; word-wrap: break-word;">
565591
<!--
566592
When set to true, the kubectl exec, cp, and attach commands will attempt to stream using the websockets protocol. If the upgrade to websockets fails, the commands will fallback to use the current SPDY protocol.
567593
-->
@@ -574,14 +600,28 @@ When set to true, the kubectl exec, cp, and attach commands will attempt to stre
574600
<td colspan="2">KUBECTL_KUBERC</td>
575601
</tr>
576602
<tr>
577-
<td></td><td style="line-height: 130%; word-wrap: break-word;">
603+
<td></td>
604+
<td style="line-height: 130%; word-wrap: break-word;">
578605
<!--
579606
When set to true, kuberc file is taken into account to define user specific preferences.
580607
-->
581608
当设置为 true 时,kuberc 文件会被纳入考虑,用于定义用户特定偏好设置。
582609
</td>
583610
</tr>
584611

612+
<tr>
613+
<td colspan="2">KUBECTL_KYAML</td>
614+
</tr>
615+
<tr>
616+
<td></td>
617+
<td style="line-height: 130%; word-wrap: break-word;">
618+
<!--
619+
When set to true, kubectl is capable of producing Kubernetes-specific dialect of YAML output format.
620+
-->
621+
当设置为 true 时,kubectl 可以生成 Kubernetes 特定的 YAML 输出格式。
622+
</td>
623+
</tr>
624+
585625
</tbody>
586626
</table>
587627

0 commit comments

Comments
 (0)